我正在尝试使用以下代码通过彩信发送图像
Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.putExtra("sms_body", "Hi there");
sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(url));
sendIntent.setType("image/png");
它打开消息应用程序并附加消息,但它没有写“sms_body”,在我的例子中是“你好”。为什么?
最佳答案
试试这个:
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setClassName("com.android.mms", "com.android.mms.ui.ComposeMessageActivity");
intent.putExtra("subject", "subject");
intent.putExtra("sms_body", "Hi there");
intent.putExtra("address", "Phonenumber");
intent.putExtra(Intent.EXTRA_STREAM, Uri.parse(url));
intent.setType("image/png");
startActivity(intent);
关于android - 发送彩信确实包含 "sms_body",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11283085/