Force Stop Will Make App's Receiver Not Being Called?
I have a service declared in XML that responds to PACKAGE_ADDED broadcast intent. It works fine, but I just found out that if I force stop the app, the receiver won't receive anyth
Solution 1:
Since version 3.1 of Android an application cant receive broadcast intents until its stared once manually. Before the first start, the application is considered as "Stopped" by the launcher. (http://developer.android.com/about/versions/android-3.1.html under "Launch controls on stopped applications").
If you manually force stop the application, this flag will be set again and you need to relaunch it manually to allow it to receive the events again.
Solution 2:
Solution 3:
If your receiver is registered dynamically by your service, when he is killed the receiver is also. But if you declare your receiver in XML this should work. (As usual boot receiver)
Post a Comment for "Force Stop Will Make App's Receiver Not Being Called?"