Important! A new Community experience launched on September 26, 2017. Read more about it here or continue to Base Camp.
Vote up!
0 Votes
1 Replies

Saving data will persist after App re- installment

Nivrita Parai on Nov 23, 2015 05:05 EST

Posted In
Vote up!
0 votes
Vote down!

Hi Nivrita,

Thank you for contacting community forums.

We can achieve this by using File Api's.Please find below Sample code .

For reading from the file and writting in the file:


var mainLoc =;

var fileLoc = mainLoc + constants.FILE_PATH_SEPARATOR + "myFile.txt";


var ifFileExists =;

if(ifFileExists) {

var reading = new;


if((reading.readAsText()) == "How are you?"){

                alert("writing was successful");



var myFile = new;

var writing = new"How are you?");



Replied by: Dec 04, 2015 07:04 EST