Reputation: 26
I am developing hybrid mobile application using phonegap.
Currently I am storing data into localstorage.
I just want to know about the lifecycle of localstorage in mobile application.
Will localstorage persist data after closing the application?
Will the behavior of localstorage in browsers and android applications would be same?
Give some reply as soon as possible.
Be needful.
Thanks.
Upvotes: 1
Views: 989
Reputation: 153
I'm also developing a mobile application with some offline data, currently testing data storage (on android) and thinking of security.
The data in local storage survived closing of app, cleaning cache and junk files (by another program) and rebooting. The only way I was able to delete it was when I cleared the data from 'Manage Apps', which was expected.
Also it should be in a sandbox so only the app and rooted users can access it.
Upvotes: 3
Reputation: 5848
In android localstorage data not deleted even if the user close the application.but it will lost when application data is cleard from app settings.So my recommendation is to use an external server to store the data and you can use API's (like json) to access the data.Here is the trick we are used in one of our project.
Upvotes: 0
Reputation: 3883
LocalStorage is not reliable, it maybe deleted by iOS system and no guarantee. You can use it for temporary, for cache or something like this.
Upvotes: 2