Page 1 of 1

Save data to AS3 on Android

Posted: Fri Mar 06, 2020 8:06 pm
by SergeyRussia
Hello.
I cannot understand why I cannot save data on Android using ES3 (with ES2 - this works).
(Everything works fine on the computer)
Please see, what could be wrong?

Re: Save data to AS3 on Android

Posted: Fri Mar 06, 2020 8:25 pm
by Joel
Hi there,

In the settings you have the location set to Data Path. The data path does not exist at runtime on Android, so you should use Persistent Data Path instead.

All the best,
Joel

Re: Save data to AS3 on Android

Posted: Fri Mar 06, 2020 8:52 pm
by SergeyRussia
Unfortunately this does not work.
I changed various settings a lot of times ..

Re: Save data to AS3 on Android

Posted: Sun Mar 08, 2020 7:22 pm
by Joel
Hi there,

Please could you private message me a project which replicates this?

Also if possible, please could you try building to Windows or Mac and see if the issue still occurs? You might also want to try deleting the app from your device to ensure there's no local data

Another thing: are any errors being output to console on device? You might need to adjust the Playmaker settings to ensure that these are outputted to console.

All the best,
Joel

Re: Save data to AS3 on Android

Posted: Thu Mar 12, 2020 12:58 am
by shamo
Hi Joel,
Also having the same problem as this fellow. Works in the editor, will not work on Android device. Tried all sorts of settings to no avail.
Previous version worked fine if set via the ES3 settings prefab with auto add to scene and auto update both unchecked.

Re: Save data to AS3 on Android

Posted: Thu Mar 12, 2020 8:22 am
by Joel
Hi there,

Have you tried updating from the Asset Store? We released a patch update last week to address this issue.

You might also want to check that your encryption password hasn't been reset in Settings when updating from the Asset Store. This can also cause the CryptographicException you encountered.

All the best,
Joel

Re: Save data to AS3 on Android

Posted: Sat Mar 14, 2020 10:27 am
by shamo
Thanks for the help Joel,
what worked was changing the .Es3 file name to a different name. It seems that updating a game via Google play usually leaves the ES3 file on the device. As I can't recall the password set previously, just creating a new file seemed the better option.
Also changing the 'key' in Playmaker from a global setting (just to make it easier) to just inputting text seemed to make a difference.

Re: Save data to AS3 on Android

Posted: Sun Mar 15, 2020 8:12 pm
by Joel
Hi there,

Glad you resolved your issue. It sounds like Google Play might be backing up the file in the cloud, which is why it wasn't deleted when deleting the app.

Let me know if you run into any other issues :)

All the best,
Joel