Skip to content Skip to sidebar Skip to footer

Sends Sms In Background When Power Button Is Pressed

Is there a way to tell my app to do something while it's running in the Background? What i try to do is to send a sms when i press the Power Button. This is what i wrote and it wo

Solution 1:

When your app is not visible it isn't "running in the background." It's in a dormant state waiting to be restored or released. To have it explicitly perform some operation while it is in this state, you need to set up a background service that will run independently from your app. To get started, check out this Google guide: http://developer.android.com/guide/components/services.html


Post a Comment for "Sends Sms In Background When Power Button Is Pressed"