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

这一生的挚爱 提交于 2019-12-12 23:09:47

问题


hi friends i am a mobile developer. So far i have worked in iPhone apps and android apps. Now i am working in Phone gap based apps for iPhone and Android mobiles.

Now my problem is in my app i have a log in page where i have to enter the username and password and i return i use to get a unique is and token which i have to use for the whole app. If the app gets closed and opened after a long time i want this to be remained 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 database.

Currently i am writing a javascript for my phone gap apps, pls give me any suggestion.


回答1:


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



来源:https://stackoverflow.com/questions/7721614/how-to-store-a-value-in-phonegap-apps-any-way-other-than-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!