Harsha M V
Harsha M V

Reputation: 54949

Launching Messaging application with a body text

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

Upvotes: 3

Views: 1341

Answers (1)

Cristian
Cristian

Reputation: 200140

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);

Upvotes: 3

Related Questions