I am using this code in an exception handler setting it as my default exception handler in my oncreate functionit is working on version 9 and less but not higher than that
Intent intent = new Intent(activity, ActivitySplash.class); Log.w("excCaught", ex.toString()); intent.putExtra("crash", true); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK); PendingIntent pendingIntent = PendingIntent.getActivity(MyApplication.instance.getBaseContext(), 0, intent, PendingIntent.FLAG_ONE_SHOT); AlarmManager mgr = (AlarmManager) MyApplication.instance.getBaseContext().getSystemService(Context.ALARM_SERVICE); mgr.set(AlarmManager.RTC, System.currentTimeMillis() + 100, pendingIntent); activity.finish(); System.exit(2);
IS there a newer version to use the needed code ? or is there something that must be added in Manisfest for newer versions
allowBackup is true and supports RTLS