Hi,
The problem is caused due to launchmode. You are using standard mode if you've not changed anything. Therefore, an instance will always be created in standard mode. One solution is using tab format, thus you can switch between tabs and activities. The other solution is keeping the values of variables in Sharedpreferences and relaunch in the new activity(by the way you could finish the previous activities by writing 'Activityname.this.finish()' or you could write android:launchmode="singleTask" to all your activity to have only one activity at a time)
or:
http://stackoverflow.com/questions/7202612/how-to-go-back-to-3rd-previous-activity-in-android[
^]
:
you can use finish() in every activity as you proceed or you can start your first activity with this flag FLAG_ACTIVITY_CLEAR_TOP and it will clear all the top activity of your first activity and it will bring your first activity on top.Use like this:
Intent intent = new Intent(this, yourFirstActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);