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.
精彩评论