views:

126

answers:

2

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?

+1  A: 

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 a SharedPreferences object and use it next time the user logs in.

Erich Douglass
Exactly, i have to use SharedPreferences in my application and it's a best way to store credentials.
Pranav
A: 

Hi,

I also need to store user's email id and password with using the ksoap and .net web service. How can i do that? For that i gone through the SharedPreferences but i couldn't got any proper idea.

So, can you give me any sample example to do that way or any ideas?

Thanks.

Pranav