tags:

views:

280

answers:

2

Hi,

Is there any way to catch crashes in my own android app? Something like a global uncaught exception handler? Just wondering if I could install something like that, then if an uncaught exception is thrown, I could pop up a dialog for the user and ask if they want to mail a dump of the exception to me.

Thanks

+4  A: 

Is there any way to catch crashes in my own android app? Something like a global uncaught exception handler?

See Thread.setDefaultUncaughtExceptionHandler().

Just wondering if I could install something like that, then if an uncaught exception is thrown, I could pop up a dialog for the user and ask if they want to mail a dump of the exception to me.

You can also use Flurry, DroidDrop, or any of the other implementations of this already available.

CommonsWare
+1  A: 

Flurry does this, plus a lot of other useful things.

Nikola Smiljanić