I have a class which extends Application. In its onCreate() I have:
Thread.currentThread().setUncaughtExceptionHandler(
new UncaughtExceptionHandler()
{
@Override
public void uncaughtException(Thread thread, Throwable ex)
{
System.exit(0);
}
});
expecting my app to go off forever. But after System.exit(0) is called, android restarts my application as if I've launched it myself. Why?
By the way, do you know any way to show an AlertDialog notifying the user of the uncaught exception?