LocalStorage plugin's locally saved data location on android?

  • Hi,

    My problem is when I uninstall and reinstall the app on android, my game saving is not lost, they come back again. (I used LocalStorage plugin to save achievements).

    When I install the app to a different android device, game starts with no saving data as expected. So I quess there is a save file left on my device and when the apk installed, it finds this saved data.

    I want to learn, what is the location of LocalStorage plugin's save data on android.

    Under "/android/data" subfolder there is a folder named com.myconstructproject which is my project created with debuk apk. And there are "cache" and "file" subfolders in it.

    But the "cache" and "file" subfolders seems to be empty although I checked the show secret files option. There are no files in it.

    Thanks in advance..

  • I haven't found a solution yet. If anyone experienced this problem before or know the reason of this problem I'm very glad to hear.

    I searched the whole forum and documentation of construct, but I can't find an information about storage mechanism of construct.

    I think, construct debug apks place their data on android where these data only accesible by the app itself.

    So this issue would be regarded as a bug.

    I wish Construct team should consider this issue.

    thanks.

  • Have you thought about using "Clear Storage" at the beginning?

  • Have you thought about using "Clear Storage" at the beginning?

    Dear newt,

    When I use clearstorage action, saved data resets as you mentioned. But after uninstalling and reinstalling the apk, it finds a saved data again what I don't understand.

    I attached summarize events of debug apk.

    This events used to work until a few days ago (all data resets when uninstalling and reinstalling the apk).

  • I agree, this is weird. I had a similar issue once, turned out it was my mistake - I was uninstalling the wrong app (same project but with a slightly different app_id).

    Have you tried another android device? Maybe there is some automatic backup app on your phone that's restoring the files?

  • Devices keep a cache, try clearing that.

  • I agree, this is weird. I had a similar issue once, turned out it was my mistake - I was uninstalling the wrong app (same project but with a slightly different app_id).

    Have you tried another android device? Maybe there is some automatic backup app on your phone that's restoring the files?

    Yes I tried, there is no problem with diffrent android devices, Apk starts with no save data.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Devices keep a cache, try clearing that.

    What do you mean exactly clearing the cache of the device.

    I tried to clear data on android many times.

    Settings > System app settings > MyConstructProject > Clear data

    After clearing data, app starts with no save data. Then I unistall and reinstall the apk. After all the apk starts with save data again. How can it be, it makes no sense.

  • atlantis_fb some Android devices will backup local application files to the cloud, it might be that when you reinstall the app those files are being downloaded as well.

    Save files are saved to indexedDB via the webview, I'm not sure where the device saves them. But the files will likely have "leveldb" in the name ( thats the name of the indexeddb implementation in Chromium ).

  • Nepeo you are great.

    on android under "settings>additional settings>Backup&reset" there is "GoogleBackup&Reset" property. I shut down "Automatic restore (when reinstalling an app, restore backed up settings and data)" option there .

    And the problem has been fixed.

    Thanks a lot...

  • Glad I could help!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)