开发者

how to store a value in Phonegap apps, any way other than database

开发者 https://www.devze.com 2023-04-12 07:25 出处:网络
I am a mobile developer. So far I have worked on iPhone and Android apps. Now I am working on Phone gap based apps for iPhone and Android mobiles.

I am a mobile developer. So far I have worked on iPhone and Android apps. Now I am working on Phone gap based apps for iPhone and Android mobiles.

Now my problem is in my app I have a login page where I have to enter the username and password. After a successful login, I return a unique token which I have to use for the whole a开发者_如何学Cpp. If the app gets closed and opened after a long time I want this to remain the same.

For this in ios apps we use a method called UserDefault method and whereas in Android apps we have a default method called SharedPreference. In that way is there any default method for Phonegap or I have to use only the database.

Currently, I am writing a JavaScript for my phone gap apps, please give me any suggestion.


One option is local storage. Here is a tutorial on using local storage with PhoneGap.

0

精彩评论

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