Reputation: 712
I have not any idea about for this. This message is changes or not in android application. I want to make that custom.
Thanks in advance.
Upvotes: 0
Views: 501
Reputation: 399
You have to implement UncaughtExceptionHandler
and assign it to your Application.
public class MyApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
Thread.setDefaultUncaughtExceptionHandler(new CrashHandler());
}
}
public final class CrashHandler implements UncaughtExceptionHandler {
private final UncaughtExceptionHandler handler;
public CrashHandler() {
// Uncomment this line if you want to show the default app crash message
//this.handler = Thread.getDefaultUncaughtExceptionHandler();
}
@Override
public void uncaughtException(final Thread thread, final Throwable throwable) {
// Show pretty message to user
// Uncomment this line to show the default app crash message
//this.handler.uncaughtException(thread, throwable);
}
}
Upvotes: 2