I have the following scenario: -
App loads, an intitial password logon screen appears. Once the user is logged on, they are then taken to a second screen. If they hit the back button on the second screen, I use the following code to take them to the home page of the device: -
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_HOME);
startActivity(intent);
The issue is that when I start the app again, it starts from this second screen. I want it to start from the logon screen again.