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

Question asked by Nivrita Parai on Nov 23, 2015 05:05 EST

Hi, In our application there is a requirement, where we need to store a Flag. So, that if the Flag is true, we have to call some events otherwise we will call some other events. But we have to keep the status Flag even if a particular user will re-install the same App. Currently we are using to Store the Flag status. But the same is getting removed after re-intalling the App. Is there any way-out in Kony to hold/keep the Flag value even after re-installing the App. So that after re-installing the App, we can call the corresponding event based on the saved Flag value.   Please provide a solution.   Thanks in advance.

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