In my application, a user can post comments only after logging in. So when a user clicks on comment activity, he/she will be redirected to login page and after successful login, he/she should redirect to that activity.
In this situation, I used startactivityfor result(), but it shows the page loading again. So when I click back button (using finish()), it again shows the same page.
I want to load the page only once.
Does anybody knows how to accomplish this?
Use sharedpreferences to save the state of users login, When the user enters ur loginscreen, if he is already logged in before, set flag as true and direct him to main page else false and ask him to log in again