I am developing a simple SMS Application in android,i am able to send and receive messages.
during receiving of sms i want my application should open whenever the sms comes from a specified number with some notification within the app and it shouldnot open whenever it comes from unspecified number..
what i am able to do is open the app whenever the message comes from the specified number but not able to stop my application from getting invoked(incase of unspecified number).
Help..
Your problem lies here:
The launching of your activity should only happen when the message is from the number you specify. At the moment you launch the activity as long as the message is not null. Instead of the code above, use this: