Quantcast
Channel: Removing an activity from the history stack - Stack Overflow
Viewing all articles
Browse latest Browse all 18

Answer by Kamal Bunkar for Removing an activity from the history stack

$
0
0

for API >= 15 to API 23 other solution not works in my case . finally i get this one.

 Intent nextScreen = new Intent(currentActivity.this, MainActivity.class);
 nextScreen.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | IntentCompat.FLAG_ACTIVITY_CLEAR_TASK);
 startActivity(nextScreen);
 ActivityCompat.finishAffinity(currentActivity.this);

Viewing all articles
Browse latest Browse all 18

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>