tags:

views:

123

answers:

1

How difficult would it be to build an android app that responds to all SMS from a certain number.

Given a certain regexp on those SMS responds with an answer to a certain number.

Example input: "HelloWorld 12345"

Example regexp: "([0-9]{5})"

Example output confif: "Purchase $2"

Should give "Purchase 12345"

Is this possible to build on Android? Is there perhaps already an app for this?

+1  A: 

On prima facie, this seems doable on Android.

There is a mechanism and enough API support to intercept incoming SMS and read them: you just have to use a BroadcastReceiver for android.provider.Telephony.SMS_RECEIVED Intent action and then use the SmsMessage.getMessageBody() to read the message text. Use SmsMessage.getDisplayOriginatingAddress() to get the Sender's detail.

There are lots of tutorials on the web that can help you get started. For instance, take a look at this and this

Samuh