Page 1 of 1

Data for ever :)

Posted: Sun Jun 01, 2014 8:50 pm
by Aris Miliotis

How can I hold some data on the device between sessions of running my app, so that every time my app runs I get that data back and don't have to start from the begining....


Data for ever :)

Posted: Sun Jun 01, 2014 11:50 pm
by Yurii Orishchuk

Hi Aris.

You can use LSV(local storage variable) for these goals.

Please pass this tutorial to understand how to use this feature.

http://devcenter.appery.io/tutorials/...

Also here is a common JS code to work with LSV:

precode

var someVariable = "Hello world&quot

//Store someVariable into "someLSV".
localStorage.setItem("someLSV", someVariable);

//Restore someVariable from "someLSV".
var restoredSomeVariable = localStorage.getItem("someLSV");

//Using restored value.
console.log(restoredSomeVariable);

/code/pre

Regards.


Data for ever :)

Posted: Mon Jun 02, 2014 3:57 pm
by Aris Miliotis

I know about that, I wasn't sure if I refresh the app if the data in LSV stays there and I can access them again when the application reloads?


Data for ever :)

Posted: Tue Jun 03, 2014 2:13 am
by Alena Prykhodko

Indeed. Please find more here http://devcenter.appery.io/documentat...