Hi guys,
Today I failed to find the SMS tutorial and example project posted by Erel long time ago.. the project was checking if the (received) SMS message title was the number 13, if so then loaded the message and parsed it (I believe).. any help appreciated.
You will most probably need to use a broadcast receiver/intent to intercept the intented SMS message. There's are plenty of examples on how to Use BR in this forum.
Broadcast receivers are extremely easy to learn about...
If you want to be able to publish your app in the Play Store, then any method to receive an SMS message will require the user to configure your app to be the device's default SMS app.
However, if you just want to receive an SMS for authentication purposes, then this method doesn't require any permissions:
Starting from Android 6 there is an Api from Google which can Listen for a Incoming SMS for you. But you do not need any Permission for this. The SMS ends up in the Devices standard SMS App but your app can do an Phoneauthentification using an SMS from your Server. Usually the way would be: 1...
One other idea I just thought of is that your app could monitor for "Notifications".
Most SMS apps will display a notification when a text message comes in, and the notification typically includes most, if not all of the contents of the text message.
The user would have to give notification access to your app, but this might be an alternate way to read text messages without your app having to be the default sms app.