I want to handle the crashes smoothly ,for that i am restarting the app for every uncaught exceptions but there is always alert box is there "unfortunately ,xyz has stopped working" code that i am using to handle uncaught exceptions :
intent = PendingIntent.getActivity(this.getApplication().getBaseContext(), 0,
new Intent(getIntent()), getIntent().getFlags());
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
@Override
public void uncaughtException(Thread paramThread,
Throwable paramThrowable) {
Log.e("Alert", "Lets See if it Works !!!");
AlarmManager mgr = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
mgr.set(AlarmManager.RTC, System.currentTimeMillis() + 2000, intent);
System.exit(0);
}