Intent intent = new Intent(MainActivity.this, FirstRunActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY|Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); finish(); // to close current activity
References
https://github.com/mhdr/AndroidSamples/tree/master/069