Is it possible to replace the default Force Close dialog box in Android?

I want users of my Android app to be able to email me a stack from any uncaught exception that causes my app to crash. Initially, I thought that I would just wrap each entry point in my application into a try / catch block, but there are too many of them even in my tiny application to make this reasonable.

What I'm really looking for is a way to specify some method as the default handler for any uncaught exceptions. Any suggestions?

+7
java android exception
source share
2 answers

You cannot do what the subject line states from the SDK application.

But:

So I'm really looking for a way to specify a method as the default handler for any exceptions. Any suggestions?

Use Thread.setDefaultUncaughtExceptionHandler() .

Also, consider using Flurry or DroidDrop or something to actually deliver your exception data.

+11
source share

You can also use Bugsense.com to get exception data (free).

PS: I am the founder :)

+6
source share

All Articles