0

I am using intent to send sms .

 Intent intent = new Intent(Intent.ACTION_SENDTO);
 intent.setData(Uri.parse("smsto:" + phoneNumber));
 intent.putExtra("address", phoneNumber);
 intent.putExtra("sms_body", messageBody);
 intent.putExtra("exit_on_sent", true);
 startActivityForResult(intent, 6789);
  1. How can I make it return to my application with result? Currently it stays in "messages" view.
  2. is there any Broadcast Receiver to know if the sms has been sent or delivered ?
Vladyslav Matviienko
  • 10,610
  • 4
  • 33
  • 52
  • 3
    There is no WAY .. You can not handle behavior of a third party app ., – ADM Feb 12 '19 at 13:17
  • thanks for your input .... is there any alternate way to know if the sms has been sent or delivered without taking the SMS permisssion ??? – Rajeev Ranjan Feb 12 '19 at 13:33
  • You could send the sms yourself ... see: https://stackoverflow.com/questions/26311243/sending-sms-programmatically-without-opening-message-app – Robert Feb 12 '19 at 13:48
  • @RajeevRanjan you can't check the status of sms without permission. And Google updated policy for sms permissions . Read it https://android-developers.googleblog.com/2019/01/reminder-smscall-log-policy-changes.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+blogspot%2FhsDu+%28Android+Developers+Blog%29 – Rajasekaran M Feb 12 '19 at 14:00
  • @Rajasekaran as per google policy we can not take the sms permission until.it meets certain conditions... my app doesn't fall under this policy thats why i have to switch to intent ... i don't want to loose my current functionality... – Rajeev Ranjan Feb 12 '19 at 19:57

0 Answers0