I have a simple problem. In my app I have 3 activities A,B,C. Activity A is the main activity.On some action on activity A it takes to activity B and then after some action it goes to activity C. When I am at activity C, I pressed home button and the home screen came. Now when I click on the app icon again it starts activity C again. But I want the activity A should be coming as I have to ask the password. I want all the activities should be finished when I press home button and when I click app icon again the login activity i.e activity A should be coming. Can anybody give me some solution?
Share
If your firing intent to go from one activity to another like this —–>
Intent intent = new Intent(this, B.class);
startActivity(intent);
then add this thing to your code then all thing will get fine —->
addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT) like this —–>
Intent intent = new Intent(this, B.class).addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivty(intent);
NOTE—> here (this) means your A activity.