Page 1 of 1

How do I store variables that remain after App is closed, phone is restarted etc?

Posted: Tue Feb 04, 2014 1:32 am
by Kerry Emerson

I am creating an app that uses a username and password combination to check an API for access to a website. Once the login check happens, I would like to store an ID and hash on the device so that next time I run the app, users do not need to re-enter their credentials. Is this possible? Do variables in local storage remain when an app is closed, or are they wiped?


How do I store variables that remain after App is closed, phone is restarted etc?

Posted: Tue Feb 04, 2014 2:47 am
by Igor

Local storage is standard browser storage and API. Data you save will persist between navigation as well as closing/opening the browser.
https://developer.mozilla.org/en-US/d...
It will get deleted if you clear the storage or over write a key/value.

You could also use SQLite database.
http://docs.appery.io/tutorials/build...