可以BroadcastReceiver的注册AndroidManifest收到意图,当应用程序被杀害? [英] Can BroadcastReceiver registered in AndroidManifest receive intents when application process is killed?
问题描述
我有注册在 AndroidManifest
的接收器,但现在看来似乎不能接收的意图时,应用程序被打死,假设我在Android的过程中生活中的一些误区轮车?
I have an receiver which is registered in AndroidManifest
, but it seems like it can't receive intents when application is killed, assume I have some misunderstanding in Android process life-cycle?
感谢您的帮助。
推荐答案
如果用户进入设置和强制停止您的应用程序,在Android 3.1及更高版本的 BroadcastReceivers
将不再工作。您将返回到相同的状态,你是第一次安装您的应用程序时 - 这是必须手动运行组件之前,您 BroadcastReceivers $ C $(例如,用户启动从主屏幕的活动) C>将再次合作。
If the user goes into Settings and force-stops your application, on Android 3.1 and higher your BroadcastReceivers
will no longer work. You are returned to the same state you are in when your app is first installed -- something must manually run a component (e.g., user launches an activity from the home screen) before your BroadcastReceivers
will work again.
这篇关于可以BroadcastReceiver的注册AndroidManifest收到意图,当应用程序被杀害?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!