Launching Messaging application with a body text

2019-07-04 01:04发布

i have this code to open the messaging. i wanna add body text into it

            Intent i6 = new Intent(Intent.ACTION_VIEW, Uri
                    .parse("sms:9986377561"));
            startActivity(i6);

add body text

body: test text

1条回答
唯我独甜
2楼-- · 2019-07-04 01:27
Intent sendIntent = new Intent(Intent.ACTION_VIEW);
sendIntent.putExtra("sms_body", "The SMS text"); 
sendIntent.putExtra("address", "phoneNumber1;phoneNumber2;...");
sendIntent.setType("vnd.android-dir/mms-sms");
startActivity(sendIntent);
查看更多
登录 后发表回答