Reputation: 11
I've developed 2 mobile apps for ios and android with animate CC and as3/ adobe AIR.
The apps use AIR's encrypted local storage (ELS) to remember user settings and bypass a registration screen after first time login. This works fine on ios (on both apps), so that even if a user uninstalls the app, then reinstalls later, the settings are remembered.
On android, the app resets itself every time - i.e. it seems that it is unable to access the ELS.
Permissions are set in the manifest as follows:
<android>
<manifestAdditions><![CDATA[<manifest>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
</manifest>]]></manifestAdditions>
</android>
<versionLabel></versionLabel>
I have been unable to find any other cases like this on the website that apply specifically to Android, though the question was also asked in this thread, it offered suggestions that should work for both ios/android and ultimately these don't seem to apply to my particular case :(
I have had a few experienced as3 coders look into this, and the code seems to be correct, and it's quite possibly permissions related.
I also attempted to use a work around (where a directory is created, and data is stored in there). Apparently, this work around code has been used on several Flex apps and works, but even so, the same problem of the app resetting data still happens. (this could hint at it being an animate cc bug, or a permissions setting thing, perhaps?)
I've tried with a few different SDKs as well (20,21,22) and no joy. Still racking my brains! Any help much appreciated!
Thanks.
Upvotes: 0
Views: 289
Reputation: 11
OK... after spending a lot of time researching this, I think I 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. 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 (so far as I know).
So, because of this, it is simply not possible to check if your ELS is set up right for Android - 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!
Upvotes: 1