开发者

How do I keep a user logged in to an application on Android?

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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜