1 Reply Latest reply on Jan 21, 2017 11:21 AM by kerrishotts

    LocalStorage persistence between application updates

    JuanPerezGT

      I have a aplication uploaded into play store but i need update to new release, my fear is lost data in previus release, android clear a localstorage when application is update or only clear when app is unistalled.

        • 1. Re: LocalStorage persistence between application updates
          kerrishotts Adobe Community Professional

          Uninstallations will always remove the associated data.

           

          Regarding upgrades:

           

          If you're referring to the `localStorage` storage API, then the behavior of localStorage persistence is highly variable depending upon your OS, webview in use, and available storage on the device. It's best to treat localStorage as something that can disappear on a whim, so my suggestion is to limit the scope of what you store in localStorage. Usually localStorage is persistent across upgrades, but I can't promise you that it will be the case 100% of the time. If your app has a backup or export feature, you may wish to suggest that your users save their data prior to updating the app, just in case. (If the data is important, this is true of any app, since there are a myriad number of ways for an update to go badly!)

           

          If you're referring to your app's persistent storage (say, using the File API or SQLite plugin), then an upgrade shouldn't lose any data.