Save Game not working when APK downloaded from Google Play

For some reason my Android Cardboard VR game does not save when I’ve uploaded it on Google Play. It works fine in editor and it also works fine when I install it via the .bat script in the packaged folder, but it does not save when it’s on Google Play. I’ve seen similar questions but none of them helped.
I’m packaging to Shipping mode in a blueprints only project.

Hello Increditastic,

I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce this issue in a clean project?
  2. If so, could you provide a detailed list of steps to reproduce this issue on our end?
  3. Could you provide screen shots of any settings/blueprints that may be involved with this issue?

Do you have your app permissions declared? When someone install your app, is question about permission - save on device or something like this? I not have app in UE4 but I created few in android sdk, same rules.

Yes. I just checked Android documentation and it says I do not need permission to save on internal storage. For external storage, UE4 automatically declares the permissions.

  1. I haven’t tried, because I’d have to upload to Google Play.
  2. I also haven’t tried. If I need to I’ll try and produce the issue in a clean project.
  3. These are my save and load BP:

Load BP

Save BP

Thank you for the additional information. Where you able to reproduce this issue in a clean project?

I am having the same issue save game works if i install the app as .bat file but if i copy and paste apk and data in the obb folder or download the app directly from play store then the save game does not work.

I heard somebody saying something like this happen because of the client can not create the directory.

I’m really worried. Despite of trying to reach Epic games and unreal support staff repeatedly. There has been no communication to the mail’s I’ve sent . No one bother’s to respond in any way . Which brings my concern that i won’t be able to publish my game since publishing it requires working save game data. If someone is reading this and has a better(faster) way to reach Epic games staff please let me know. Case #1445902 .

If you are facing the following issue then :
Fix
Step 1. Go to Project Settings

Step 2. Enable the checkbox " Use ExternalFilesDir for UE4Game files ?

I have similar problem, but at last, I save it by myself,
I save the file under:
FString savePath = FString::Printf(TEXT("%sSaveGames/%s.txt"), *FPaths::ProjectPersistentDownloadDir(), Name);

and custom serialize saveobject to this file, it works.

This totally worked for me!

Thank you so much Adwait!

I’m having the same issue.

  • Local testing works fine (from PC)
  • Testing it by installing the APK with the BATCH file works fine
  • installing from the app store and save games don’t work at all

Any news on this?

Wouldn’t this delete the savegame/data once a player uninstalls the app?

This does seem to fix the problem with a Android Shipping build.

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will follow up.

Thanks,

Confirmed again that this solution fixes save game data in Android Shipping builds. Thank you!

Another one who had to use this on a S8 to get a save game working on shipping build, thanks :slight_smile:

Actually, Use ExternalFilesDir for UE4Game files is not the best, and possibly dangerous idea. The point is that save game generated this way will always be deleted when user uninstalls the app. But update on Google Play, as far as I know, does exectly this - uninstalls and then installs the app again, so each time you update the app users lose all progress.

I managed to make save game work without ExternalFilesDir for UE4Game files enabled, but for this I have to permit write for my app manually via Android settings. The problem is that you need to warn user that in order to make saves he has to make such manual permission himself. Also not the best idea.

Why do we need to check this to allow the save game to be written on the app storage? I mean this box is to write on SD card not internal memory. Thanks for the clarification.