I use the code below to send SMS using the built-in sms composer
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.putExtra("address", "1234567890");
intent.putExtra("sms_body", "Hai");
intent.setData(Uri.parse("smsto:"+"1234567890"));
//intent.putExtra("exit_on_sent", true);
startActivityForResult(intent, 1);
It works, but after sending SMS, it does not return to my activity. If I put aim.putExtra ("exit_on_sent", true); then the sms body is shown empty in the sms composer.
I want to show content in the composer, and it should return to my activity after sending SMS. Any way to implement this?
source
share