有没有什么方法可以检测应用程序崩溃,然后在 Android 中再次启动它?
Is there any way to detect an application crash and then launch it again in Android?
我有一个 APP_A。长时间激活会崩溃。我试图找出解决问题的方法,但仍然陷入困境。所以我想尝试一个短期解决方案,在后台启动 APP_B,然后检测 APP_A 的状态。如果它崩溃了,那么 APP_B 将再次启动它。
有什么方法可以检测 APP_A 是否崩溃?
您可以使用事件总线库(https://github.com/greenrobot/EventBus) to detect your crash on every situation in your apps and send mail to your mail ID to detect the crash report by using this library (https://github.com/ACRA/acra)
当系统强制停止您的应用程序时,整个进程将被终止。没有回调通知您发生了这种情况,但有解决方法,您可以尝试:
https://medium.com/@ssaurel/how-to-auto-restart-an-android-application-after-a-crash-or-a-force-close-error-1a361677c0ce
一种方法是通过 FABRIC 获取崩溃并通过分析堆栈跟踪检查 ANDROID STUDIO 中的日志。
ANDROID 工作室 --> 分析 --> 分析堆栈跟踪
我有一个 APP_A。长时间激活会崩溃。我试图找出解决问题的方法,但仍然陷入困境。所以我想尝试一个短期解决方案,在后台启动 APP_B,然后检测 APP_A 的状态。如果它崩溃了,那么 APP_B 将再次启动它。
有什么方法可以检测 APP_A 是否崩溃?
您可以使用事件总线库(https://github.com/greenrobot/EventBus) to detect your crash on every situation in your apps and send mail to your mail ID to detect the crash report by using this library (https://github.com/ACRA/acra)
当系统强制停止您的应用程序时,整个进程将被终止。没有回调通知您发生了这种情况,但有解决方法,您可以尝试: https://medium.com/@ssaurel/how-to-auto-restart-an-android-application-after-a-crash-or-a-force-close-error-1a361677c0ce
一种方法是通过 FABRIC 获取崩溃并通过分析堆栈跟踪检查 ANDROID STUDIO 中的日志。 ANDROID 工作室 --> 分析 --> 分析堆栈跟踪