views:

20

answers:

1

Hey everyone,

I have an app with an SMS receiver set up, but even if the sms receive function is turned off using the package manager, the app will go to the top of recent applications (when holding the home button) if a sms is received. How can I stop this behavior?

Thanks for any help in advance.

Cheers!

A: 

How are you handling receipt of SMS messages? It sounds like you might have somehow registered your Activity as the receiver for these.

Broadcast receivers don't have a UI, so they shouldn't show up in the activity switcher. Can you confirm that you're not using a broadcast receiver?

http://developer.android.com/reference/android/content/BroadcastReceiver.html

Trevor Johns
I am definitely using a broadcast receiver. However, I have it start an activity without a UI to put up a notification. I guess my question then is how do I put up a notification from the broadcast receiver - I can only get notifications to work from activities.Also, shouldn't deactivating the broadcast receiver prevent the app from opening?
Brian515