Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to start activity from UncaughtExceptionHandler if this is main thread crashed?

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?

like image 331
alex2k8 Avatar asked Feb 08 '10 14:02

alex2k8


1 Answers

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.

like image 156
Dave Webb Avatar answered Oct 14 '22 19:10

Dave Webb