2

I'm using Intent to send SMS:

Intent sendIntent = new Intent(Intent.ACTION_VIEW);
if (sendIntent != null) 
{
    sendIntent.putExtra("sms_body", url); 
    sendIntent.setType("vnd.android-dir/mms-sms");
    startActivityForResult(Intent.createChooser(sendIntent, "Sending SMS..."), 1);
}

How can I make it return to my application with result? Currently it stays in "messages" view.

Misha
  • 5,260
  • 6
  • 35
  • 63
  • possible duplicate of [Sending text messages programmatically in android](http://stackoverflow.com/questions/8578689/sending-text-messages-programmatically-in-android) – Martin Thurau Mar 06 '13 at 08:43
  • 5
    Thank You Martin, but this question relates to SmsManager. while I'm using Intent. – Misha Mar 06 '13 at 09:43
  • @Mike did you get any work around? – John x Mar 20 '14 at 05:49
  • Nope. I just can get activity result that is always the same. So I'm just telling that operation done and not success/failure. The only solution I can think of is to do my own sms view and to use SmsManager there. – Misha Mar 20 '14 at 06:56
  • @Misha which is not an option anymore, due to Google's new SMS and phonecall permissions (March 2019). In my app I'm stuck with hoping the user actually sent the sms without being able to know if they did... – Lucas P. Feb 18 '19 at 16:06

0 Answers0