0

There are many tutorials on how to create sms receiver, specifying BroadcastReceiver in Manifest file. But the problem is that I don't wanna receive each SMS. I send SMS in my Login activity and then want to immediately catch it to extract validation code sent. Any ideas on how to specify the BroadcastReceiver within activity in this case?

Thanks in advance!

  • Call `registerReceiver()` to register the `BroadcastReceiver`. Note, though, that SMS is a very insecure control channel, and other SMS apps may intercept and consume the SMS message. – CommonsWare Jun 10 '15 at 23:21
  • possible duplicate of [Sending and Receiving SMS and MMS in Android (pre Kit Kat Android 4.4)](http://stackoverflow.com/questions/14452808/sending-and-receiving-sms-and-mms-in-android-pre-kit-kat-android-4-4) – Dan S Jun 10 '15 at 23:24

0 Answers0