android - BroadcastReceiver not working when I kill my application -


Whenever I manually killed my application manually by pressing the back button of my cellphone, then My broadcast receiver closes the work. The receiver is in charge of displaying the notification every time the user has been given a phone call and it is registered in manifest.xml.

Is this a normal / expected behavior? I thought the receiver should continue to work, even if the user decides to kill his application ... is there a way to stop it?

Thank you.

Edit

This is a manifest entry for the receiver:

   & Lt; Action Android: name = "android.intent.action.PHONE_STATE" /> & Lt; / Intent-Filter & gt; & Lt; / Receiver & gt;    

There are 7 billion people on the planet, only you know that "kill" What to say.

The symptoms you are describing, however, are consistent with "force stop". A user normally stops the application by going to settings, finding your app in the list of installed apps and tapping on the "Force Stop" button for your app. Some devices and firmware are built that make it more easily accessible from "Force Stops" - such devices and firmware Building Idiots were written by IhrHo by Drolling.

If your app has stopped for a while, your code should never run again, as long as one of the components of your component is explicit intent Does not use Typically, the user does this by tapping on his app's icon in the home screen launcher. Unless the user does this, your broadcaster receiver will not work, and can not do anything about it.

To "kill" your app, try to terminate your process by doing some on-the-DDS. If your app continues to work in that situation, then you are still doing "abbance-stop" before the end of your process to "kill" your app, due to low memory conditions, You should not stop getting future broadcasts.

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -