I working on an iPhone Application using phone GAP.In my app we are using an external DB .User login using web service, i need to store user ID after login .How i store the user ID using phone GAP.can i use phone GAP Session Storage for this?is possible?
Any one knows please helps.
Thanks, Companion.
You can set session storage like that
You will get this session variable like that
Note: This variable will reset after close app but if you wants to save on localstorage then you need localStorage function which will not reset after close app
Lawnchair is probably overkill just to store and ID, just use HTML5 local storage.
You really don't have the concept of "session" in Phonegap - you have HTML5 localStorage to store persistent data (think "application scope"):
Log user in:
});
There is a concept of SessionStorage. It works the same way as localStorage, but gets erased every time you close the application
You could try lawnchair to store data as JSON.