0

I created an Android application that requires a user to login. After this, the user is able to see a menu with different information, including a background service that send a notification to the user when he is at an specific place. The problem is that if the user hits the back button and closes the application, when he tries to see the notification the application restarts again, therefore, he is asked for his credentials again... Is there a way that an application doesn't ask the user's credentials if he has signed in previously? (Just like fb and such apps?). Thank you very much.

1 Answers1

0

The reason why apps like FB remain logged in is because they use an authorization token which allows them to stay logged in for as long as the token is valid and recognized by the server (which can literally be forever). In your app, I'm guessing that you do not have this authorization token or if you do, it is valid only as long as the app is not closed (the onDestroy() method is not called).

ucsunil
  • 7,378
  • 1
  • 27
  • 32