I am writing an android application. Each time you log on, you must enter your username and password. How to make sure that once you log in, your personal account is permanent until the user wants to log out (as with VKontakte application)? Is it necessary to use Service for this?

    1 answer 1

    Keep the login and password in SharedPreferences in if there is something there - login. Services for this are not needed. On the "login" button, just clear the data.

    • not bad to say that the preferences - a simple text file and a login with a password will not be protected. that is, take care of encryption in the street or use special tools of android to store confidential data - pavlofff