Skip to main content
Participating Frequently
June 27, 2016
Question

Android Encrypted local storage resetting on upgrade

  • June 27, 2016
  • 1 reply
  • 434 views

I've made an app for ios and android that uses encrypted local storage to remember user settings. It works fine on ios, and when I test it via windows as well - so it doesn't appear to be a coding issue.

On android, however the data keeps getting deleted on reinstall, or upgrade - no matter what I try!!! I've released the app on the play store, so it's not just because I'm testing it.

I've had other people look into it as well, and even got a work around coded (where a directory is created, and data is stored in there). Apparently, this code has been used on several Flex apps and works, so it could be specific to authoring on animate. I've tried with a few different SDKs as well (20,21,22) and no joy.

The permissions in the manifest specifies write privileges, but perhaps there is another setting that needs to be added?

At any rate, I'm completely stumped! It seems like this type of feature is pretty standard and utilized in many apps, so I cannot understand why it's so troublesome to fix. Any help or guidance appreciated.

This topic has been closed for replies.

1 reply

Participating Frequently
July 1, 2016

OK... after spending a lot of time researching this, I've cracked what's going on. Hopefully this post will save others similar pain in the future.

Basically... Adobe Animate / Flash "flushes" apps each time they are re-installed on Android, and this includes flushing the ELS. This is only when Animate compiles for Android devices (ELS data remains on ios and my PC for example).

On Flex, it seems flushing can be turned off, but it's currently not an option on Animate (it would be great if it were).

So, because of this, it is simply not possible to check if your ELS is set up right for Android when compiling onto a device - because each time you reinstall a new version, all data is wiped.

The good news is... Once your app is on the Play store, it doesn't get flushed on upgrade in the same way!

I confirmed this by uploading a version 1.0 of my app live, downloaded it via the play store, then uploading 1.01 and upgrading to that one. After which, ELS was still in tact!

July 1, 2016

From what I understand with Flash CS6/CC and Animate, when you publish an Android app to an Android device, it removes the app and then installs the new build. If you open the app drawer while it is building and installing the app, you can see the app disappear from the app drawer (at least on my Nexus 4 and 5) and then appear again before autolaunching. So it isn't so much that Animate is flushing the data as it is fully uninstalling the old version before installing the new build.