Open the Android app by sending a text message?

I was wondering if it is possible to open the Android application on someones phone by sending them a text message, assuming that the user has already installed the application on his / her phone. Like, where is my Droid app? Can I send it as a text message with the words "OPEN", the background service will recognize this and open the application? Is this possible, and if so, their examples? Thanks

+7
source share
2 answers

Yes, you can with permission in the manifest. You can say that your application listens to the intention android.provider.Telephony.SMS_RECEIVED, which will turn on the broadcast receiver when an SMS message arrives. Then, with permission, which allows you to read SMS, you can simply check whether the received SMS matches your parameters (for example, the sender's phone number and text content).

After you have verified that sms is the correct sms, you can start the Activity or whatever you want.

+4
source

You just need to add the correct permission to the manifest:
"Android.provider.Telephony.SMS_RECEIVED"

And then you will need to extend the class from IntentReceiver. And override the onReceiveIntent method

0
source

All Articles