没有任何收件人的Android推出手机短信意图 [英] android launch SMS intent without any recipient
本文介绍了没有任何收件人的Android推出手机短信意图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从我的应用程序中打开了Android短信应用程序,我不想设置任何接触,因为收件人,如何?
解决方案
开放的URI = Uri.parse(smsto:);
意向意图=新的意图(Intent.ACTION_SENDTO,URI);
intent.putExtra(sms_body,的Hello World!);
startActivity(意向);
注意
这种方式不需要在清单
I want to open the Android SMS application from my application and I don't want to set any contact as a recipient, How?
解决方案
Uri uri = Uri.parse("smsto:");
Intent intent = new Intent(Intent.ACTION_SENDTO, uri);
intent.putExtra("sms_body", "Hello World!");
startActivity(intent);
note
this way doesn't need any permission in Manifest
这篇关于没有任何收件人的Android推出手机短信意图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文