如何开始从UncaughtExceptionHandler的活动,如果这是主线程崩溃?这是、主线、UncaughtExceptionHandler

由网友(~甜死人不偿命 ̄3 ̄)分享简介:我试图启动错误报告activty如果未处理的异常检测。问题是与主线程抛出的异常。有没有什么办法可以开始活动,如果主线程崩溃?I am trying to start an error-reporting activty if unhandled exception detected. The problem is w...

我试图启动错误报告activty如果未处理的异常检测。问题是与主线程抛出的异常。有没有什么办法可以开始活动,如果主线程崩溃?

I am trying to start an error-reporting activty if unhandled exception detected. The problem is with exceptions thrown from main thread. Is there any way to start an activity if main thread crashed?

推荐答案

我已经看到了用于错误捕获在一个UncaughtExcpetionHandler是写碰撞数据到文件,然后启动错误处理活动当应用程序是基于碰撞数据文件的存在,重新开始。

The approach I've seen used for error catching in an UncaughtExcpetionHandler is to write the crash data out to file and then start the error handling Activity when the application is restarted based on the existence of the crash data file.

根据你希望你的活动做的,这可能为你工作。

Depending on what you want your Activity to do, this might work for you.

阅读全文

相关推荐

最新文章