When a user logs in to my online android application, I want to store a cookie on the user’s phone so that he doesn’t have to log in to the application on subsequent visits from the same phone.
How do I do this on android?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You might want to look at using
SharedPreferences. Preferences are stored on a per application basis and are private to the application by default. Basically, once the user supplies valid credentials, you’d save them to aSharedPreferencesobject and use it next time the user logs in.