Save game not working on android

Hmm, that is strange… On Android, there are four lifecycle methods of activity:
onStart, onResume, onPause and onDestroy (i’m not sure about last one name), and each and every one of them is called when activity is changing it’s lifecylce.

The concept of quit is present as onDestroy method of activity. As for lacking this the only mobile platform which is missing this is propably iOS, which does not cover any events for shutting down, only pause as you said.

onDestroy isn’t reliable for this. From the Android onDestroy docs:

Note: do not count on this method being called as a place for saving data! For example, if an activity is editing data in a content provider, those edits should be committed in either onPause() or onSaveInstanceState(Bundle), not here. This method is usually implemented to free resources like threads that are associated with an activity, so that a destroyed activity does not leave such things around while the rest of its application is still running. There are situations where the system will simply kill the activity’s hosting process without calling this method (or any others) in it, so it should not be used to do things that are intended to remain around after the process goes away.

Yes i know. I just wanted to point out, that Android has something like quit. Unlike iOS.

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?

I am having the exact same issue, is there a new permission for writing to device that we are missing? Or is this something that unreal broke?
I am building on 4.19.2 and only when i install from the play store does the save game not work.

I really need a solution for this asap.

I have the exact same problem.

So i found this:

This can help a lot of you :slight_smile:

Your link work fine brother. Now I can save game on android mode

Hey Knaril

I checked the link and checked “Use ExternalFilesDir for UE4Game files”, as suggested.

But I am still unable to save games. “Save Game to Slot” Blueprint Node works fine in the Editor but returns false when packaged and installed on the android device.

I tried both - manually copied apk to device and installed/used bat file to install directly from pc.

UE4.25.3 - Android 11

Any ideas?

Hey ,

I’m still facing this issue and have hit a dead-end in my search for answers.

I am unable to save game on android. “Save Game to Slot” Blueprint Node works fine in the UE4 Editor but returns false when packaged and installed on the android device.

Here are the details:

UE4.25.3
Android Minimum SDK: 19
Android Target SDK: 30
Install Location: Internal Only
Package Game Data inside .apk? - Checked
Use ExternalFilesDir for UE4Game files - Checked
Packaged Development Build with Project Launcher
Tried both - manually copied apk to device and installed/used bat file to install directly from pc
Android Device: Xiamoi Redmi Note 8 Pro
OS: MIUI 12.5.3
Android Version 11

You can also create a fresh project and package it with these settings. You’ll see that the “Save Game to Slot” works in editor but fails on Android.

Hey tehhax,

Were you able to solve this?

Also please tell me how to access Android log files. I can’t seem to find them even after checking “Make log files always publicly accesible”