I want to detect when an uncaught exception has happened in my Android app. Once detected, I want to display a confirmation dialog
How do I get this confirmation dialog to display? When I tried various techniques, the UI is unresponsive and appears to be frozen.
My code responds to this:
//new CatchAllExceptionHandler(this) is my custom handler Thread.setDefaultUncaughtExceptionHandler(new CatchAllExceptionHandler(this));
I have tried these two implementations of CatchAllExceptionHandler:
- Display an Alert dialog
- Start an activity that then displays an alert dialog after onCreate
Both these methods failed.
So my question is: How to I get the confirmation dialog to properly display?