-3

I'm working on an app that will auto reply with an pre-coded SMS to the sender. Sending a message is easy. My problem is I can't seem to get the message and get the sender's address/number. I have searched over and over and over for this answer. All I need is to know is how to get the sender's address and only the address. Nothing else is needed. Everything that I've tried to reference just throws a ton of code at me that I don't need. Can anyone help me?

  • Have you looked through this https://stackoverflow.com/questions/13098472/any-way-to-get-the-sender-phone-number-from-a-received-sms-on-android? – Elvis Chweya Feb 19 '16 at 03:55

1 Answers1

0

I am assuming that you are receiving the sms through the sms broadcast. You can extract the sender address from the intent. Example:

http://androidexample.com/Incomming_SMS_Broadcast_Receiver_-_Android_Example/index.php?view=article_discription&aid=62&aaid=87

Phuong Nguyen
  • 909
  • 7
  • 20