Home » Android » NativeScript Application saves old data

NativeScript Application saves old data

Posted by: admin November 1, 2017 Leave a comment

Questions:

I`m building an app that every time I run it its supposed to download different information from the internet.
The problem is that if I dont kill it manuly from memory after exit the next execution will run with old data, I have tried clearing the folder which contains the data from the web with the folowing code before exiting and on execution to no affect

var temp = fs.knownFolders.temp();
    temp.clear().then(function(){
    process.exit();
});

Help will be appreciated 🙂

Answers: