Call finish in your activity right after starting the next activity. Another approach is to add this attribute to your activity in AndroidManifest.xml: android:noHistory="true"
<activity android:name=".YOUR_ACTIVITY" android:noHistory="true"/>
This attribute instructs Android to remove YOUR_ACTIVITY from the history stack once its navigated away from.For remove History of New launching Activity Using Java Code
Set intent flag FLAG_ACTIVITY_NO_HISTORY before start your activity.
intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
The new activity is not kept in the history stack. As soon as the user navigates away from it, the activity is finished
Most welcome...
ReplyDelete