Ideal way to set global uncaught exception Handler in Android

That should be all you need to do. (Make sure you cause the process to halt afterward — things could be in an uncertain state.)

The first thing to check is whether the Android handler is still getting called. It’s possible that your version is being called but failing fatally and the system_server is showing a generic dialog when it sees the process crash.

Add some log messages at the top of your handler to see if it’s getting there. Print the result from getDefaultUncaughtExceptionHandler and then throw an uncaught exception to cause a crash. Keep an eye on the logcat output to see what’s going on.

Leave a Comment