0

I'm working on an app that requires to read the reply of a particular sms message sent and update the Database, i know i can use SmsManager (Pending Intent) class to know the status of the message (Like SENT or DELIVERED) and also broadcast receiver for receiving sms but i want to be able to read the user reply to that sms. There can be multiple message sent at a particular time which i want to be able to differentiate between response for each sms. Is there a way to attach something like an id to sms and get it back when i receive the reply or how can i achieve this? most of the tutorials online only cover how to listen to the status and how to receive new sms.

sodiqOladeni
  • 898
  • 7
  • 14
  • I think you want to know the sender and message content of an incoming SMS [link]https://stackoverflow.com/questions/9378328/android-how-to-get-phone-number-from-a-incoming-sms [link]https://stackoverflow.com/questions/5007332/how-to-read-the-message-content-of-a-new-in-coming-message-in-android – Ramees Thattarath Jul 24 '18 at 18:37
  • There can be multiple message to a single smsAddress, i nee d to know which of the message he is replying to @RameesThattarath – sodiqOladeni Jul 24 '18 at 18:43
  • I dont think there is a one to one mapping between SMSes in android, all SMSs from same address are considered similar – Ramees Thattarath Jul 24 '18 at 18:49
  • Nope, you can't really do that. It's not just Android. SMS is a stateless protocol. There's nothing that relates one particular message to another, other than the address. That is, you can't know if a user is replying to a specific message; only that they're sending to a given number. – Mike M. Jul 24 '18 at 22:15
  • Good @MikeM. i will look for other alternative – sodiqOladeni Jul 25 '18 at 15:11

0 Answers0