In my application, first activity is login page activity.
Users enter username and password and enter into the home page activity.
If you logout from home page, it moves to the login page activity. Now,if you press back button my application should be closed, but it enters into the home page again..
But initially when login page activity is launched and while pressed back button without entering into the home page activity. application is closing..
When you log out from
home activity, callfinish()for home activity.