Open Android App by sending a text message?
Asked Answered
C

2

7

I was wondering if it is possible to open an android app on someones phone by sending them a text message, assuming the user already has the application installed on his/her phone. Sort of like where's my Droid application? Could I send it like a text message saying "OPEN " a background service will recognize this and open the app? Is this possible and if so are their examples? Thanks

Crossgarnet answered 17/6, 2011 at 12:43 Comment(0)
O
4

Yes you can, with the right permission in manifest. You can tell your application to listen on android.provider.Telephony.SMS_RECEIVED intent, that will turn on a broadcast receiver when an SMS arrives. Then with the permission that grant to you to read the SMS you can simply check if the received SMS match your parameters (phone number of the sender and text content for example).

Once you've checked that the sms is the right sms you can start an Activity or what you want..

Obtuse answered 17/6, 2011 at 12:48 Comment(1)
So for example, if the SMS matches <BlahBlah> I could start and intent? how exactly do you all the application?Crossgarnet
Q
0

You just need to add the right permission in manifest:
"android.provider.Telephony.SMS_RECEIVED"

And then you'll need to extend a class from IntentReceiver. And override the method onReceiveIntent

Quattlebaum answered 17/6, 2011 at 14:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.