This recipe will demonstrate how to set up a broadcast receiver to notify you of new SMS messages. It's useful to note that your app does not need to be running to receive the SMS Intent. Android will start your service to process the SMS.
Receiving SMS messages
Getting ready
Create a new project in Android Studio and call it ReceiveSMS. Use the default Phone & Tablet options and select Empty Activity in the Add an Activity to Mobile dialog.
How to do it...
We won't be using a layout in this demonstration as all the work will be in the...