I am writing an application in which there are 5 activity A,B,C,D,E,F.Activity A is a login screen when user login A invoke a screen which has four tab and each tab has a screen.I want when user move from login screen to Activity B pressing back button should not come to login screen until not logout.
My tab activity has four screen like first one is monitoring and other are chat,operators and controls.I want pressing back button does not come to first login screen until logout how can this possible.
Actually i want until the user logout pressing back button come to monitoring screen that come after login.If user close the application using home button and then again start the application come to monitoring window not the login screen.how can this possible.
You should say finish() and then go to your next Activity from loginscreen
// your click
finish();
Intent i = new Intent(getApplicationContext(),NextActivity.class)
startActivity(i);
From your last activity say i.addFlags(Intent.FLAG_NO HISTORY) and call loginscreen