android.intent.action.SENDTO:在Galaxy选项卡中显示activity com.android.mms/.ui.ConversationList

android.intent.action.SENDTO:在Galaxy选项卡中显示activity com.android.mms/.ui.ConversationList,android,Android,我使用了intentandroid.intent.action.SENDTO来启动短信活动 在emulator和一些android手机(如htc)中,显示的活动是 活动com.android.mms/.ui.ComposeMessageActivity。也可以设置文本消息正文 而在Galaxy tabcom.android.mms/.ui中,ConversationList是显示的活动,无法设置消息正文 以下是我的代码: Intent intent = new Intent(Intent.ACT

我使用了intentandroid.intent.action.SENDTO来启动短信活动

在emulator和一些android手机(如htc)中,显示的活动是 活动com.android.mms/.ui.ComposeMessageActivity。也可以设置文本消息正文

而在Galaxy tabcom.android.mms/.ui中,ConversationList是显示的活动,无法设置消息正文

以下是我的代码:

Intent intent = new Intent(Intent.ACTION_SENDTO, Uri.parse("smsto:"));
        intent.putExtra("sms_body", messageBody);

intent.putExtra("compose_mode", true);
startActivity(intent);

如果显示的活动是ConversationList,如何在Galaxy选项卡中启动activity ComposeMessageActivity或设置消息正文

我找到了解决办法。我用intent.ACTION\u视图替换了intent.ACTION\u SENDTO

这是新代码:

Intent intent = new Intent(Intent.ACTION_VIEW); 
intent.putExtra("sms_body", messageBody); 
intent.setType("vnd.android-dir/mms-sms"); 
startActivity(intent );. 
这就是我得到解决方案的地方: