Android 10 Save Game Doesn't Work

Hello, I have a published game on google play store, which already sold more than 500 and already has active players with save files. When I am publishing, I did not check the Use ExternalFilesDir option. Because for most of the devices save and load function works. But as I get from the reviews and comments under the game, most of the Android 10 users cannot save the game. If I check Use ExternalFilesDir option and update the game, I know all users who have already played the game will loose their save data. We do not want that because most of them already bought in app purchases and in game currency. Is there any way for us to fix this save game issue for android 10 without loosing the active players save data?

Note, I ask for write external permission on start. I checked on my Android 10 device for the application permissions and it has writing permission already. But still doesn’t save.

I tried the game on Android 10, in folder manager, UE4Game folder is not event created while playing, so it’s not writing.

Thanks in advance.

Fixed by changing target api from 29 to 28.

pfff … i have the same save game problem, but if i change api to 28 then Google will not let me upload it and ask me to use minimum api 29.

Same, did you find any way around this?

No, with the Google update requiring 29 as minimum api, we have no solution

Note that is better to store in app purchase on an external server / database since the local savegame can be easily altered to unlock anything for free.

I just noticed that my game wasn’t saving, and i got into checking why it’s not working since then.
For what i found even epic says to Use ExternalFilesDir option, wich was not working for me on any target api, so i remade my Logic for Saving / Loading and Checking for Permissions and now it’s working but it’s probably not what we want so i finally found this page and got some info on what is going on:

ACTUAL SOLUTION:
Check and rewrite your logic according to mine if this is not working for you

  1. Uncheck Use ExternalFilesDir
  2. Change your target API to 30 i found out it’s not working if you use 29 for some odd reason.
  3. In
    project settings in Android tab, add
    an extra tag for application node
    and put this

android:requestLegacyExternalStorage="true"

  1. Add this Extra permissions

android.permission.WRITE_EXTERNAL_STORAGE
android.permission.READ_EXTERNAL_STORAGE

If your app is scripted well it should work this way, if not you can check the screenshots of how i setup my logic in the Game Instance and just do a straight forward Save Game if the Save Game is not present.
Hope this help you guys out to have save game working on latest api and upload to google play!

Note that i removed the isValid node and moved the creation of the save object at the beginning of Event Init to fix some issues

6 Likes

I updated my answer after further testing and it’s working perfectly for me now without the use of ExternalFilesDir option
If it works for you aswell please mark as answer for others with this problem!
This was a real struggle been 48 hours of hell.

Have you tested a shipping package? Mine only seems to work on a distribution version (at API 29)

Excellent answer man.

I am testing this, I’ll mark it if it works

If it’s relevant my game is packaged for Shipping with For Distribution checked on target 30 and works as intended on Android 10

I also made the same changes but still doesn’t save on android 10. It’s built for target 30.

Have you fixed your problem? (Because I have the same problem)

Shipping with android target 30 solved the issue for most of the devices that has android 10. But still, there are some who still have the save issue. And I have no idea why.

Hi, I would like to ask, because I have the same problem with Android 11. On Android 10 everything works fine, what should I do to make save system work on Android 11?

I have the same problem for android 11. Is there anyone who can help us?

Did you find the solution to the problem? There are people who have the same problem.

my question is, why don’t just use “Use ExternalFilesDir for UE4Game files” ? What are the advantages of each option?

The ExternalFilesDir delete the save game when uninstalling the app, the other way you can keep the savegame when the game is uninstalled.
But since Android 11 has new restrictions, that is the easiest solution.

As a followup to my answer, i can confirm that everything works for Android 10 and Below,
but Android 11 has new scoped restrictions and they changed the way you can access and write files.
So this will not work on Android 11, the best thing is using the "Use ExternalFilesDir option, Otherwise you will have to edit the engine and change the save path and point it somwhere that can work with the new android 11 scoped permissions, another possible way is to use the new Permission to access all files but that requires google to grant you the permission to use it at the moment, that is what i know so far, if anyone has some more informations maybe we can figure it out. In my opinion is not worth the trouble of editing the engine at the moment, so for the moment i propose the use of ExternalFilesDir.

1 Like