安卓:BroadcastReceiver的重新启动杀害/崩溃的应用程序重新启动、应用程序、BroadcastReceiver

2023-09-07 14:02:45 作者:满身情歌味

我有一个应用程序,我想能够重新启动它的错误或崩溃/应用程序停机的事件。我熟悉如何注册 BroadcastReceivers ,使用警报器等。

有没有信号,我可以拦截该应用程序发送出去时,它关闭?或者说,OS发出时,任何应用程序关闭?

解决方案   

有没有信号,我可以拦截该应用程序发送出去时,它关闭?或者说,>操作系统发出时,任何应用程序关闭?

没有,没有,AFAIK。

I have an application and I would like to be able to restart it on the event of an error or a crash/app shutdown. I am familiar with how to register BroadcastReceivers, use alarms, etc.

Android之BroadcastReceiver

Is there any signal I could intercept that the app sends out when it shuts down? Or that the OS sends out when any app shuts down?

解决方案

Is there any signal I could intercept that the app sends out when it shuts down? Or that the > OS sends out when any app shuts down?

No and no, AFAIK.