Android: sending SMS through intent with body and returning back.

Viewed 1598

I am trying to send a SMS through an intent, I want to add a body to the message. After user press send I want to return to the app. I've added extra as sms_body and exit_on_sent. But when I use them both the SMS appears without the body. If i don't use the exit_on_sent extra everything works fine.

    Intent sendIntent = new Intent(Intent.ACTION_VIEW);         
    sendIntent.setData(Uri.parse("smsto:" + phoneNumber));
    sendIntent.putExtra("sms_body", "some text");
    sendIntent.putExtra("exit_on_sent", true);
    context.startActivity(sendIntent);
1 Answers
Related