All actions in my applications with the "Exit" button and the user can exit any activity. I want to send the user to the system without showing previous activity. for this i use:
The following is a logout method.
public void logoutUser() {
from the second action, when the user presses the logout button, and then the call method is called. My second activity class extends the SherlockFragmentActivity property.
public void Logout(MenuItem v) { sessionMngr.logoutUser(); }
I am on the login screen when I press the exit button, but when I press the button on the device, it shows the previous steps - I have to go to the Android main screen when I press the "Back" button on the login screen.
I saw some question about stackoverflow, but did not reach my goal. someone said that I am using android: noHistory = "true" in the manifest file, but what happens when I am in the third step and press the button that displays the Android start screen, but it should go into the second activity. I also tried FLAG_ACTIVITY_NO_HISTORY, but that also does not reach my goal.
I do not understand where I am mistaken. Please someone have a solution.
Thank you in advance
source share