Android - 以编程方式打开Messages应用

时间:2013-08-27 00:19:55

标签: android android-intent

是否可以以编程方式指定号码和消息来打开消息应用程序?

enter image description here

我不想直接发送消息,而是希望人们在发送消息之前选择特定的SIM卡。

1 个答案:

答案 0 :(得分:2)

是的,这是可能的

Intent intentsms = new Intent(Intent.ACTION_VIEW, Uri.parse("sms:"+phone));
       intentsms.putExtra("sms_body", "text of massege");
       startActivity(intentsms);