Hello,
I have seen many people writing that their savegame works on their computer but not on their Android device. This is because Google has introduced scoped storage with Android 10.
https://developer.android.com/about/versions/11/privacy/storage
I have found a solution that is not quite perfect because it only works in Shipping Mode if you only want to test your game you should set the Target SDK to 28 (Android 9).
The steps you need to do to get your savegame working on your Android devices are:
ă…¤
ă…¤
Step 1.
Set the build configuration to Shipping and check “Full Rebuild” and “For Distribution”.
ă…¤
ă…¤
ă…¤
Step 2.
Set the Target SDK to 31 and check “Use ExtenalFilesDir for UE4Game files?”
ă…¤
ă…¤
Step 3.
Open the windows prompt and go to the Java/jre/bin folder with the command “cd C:\Program Files\Java\jre1.8.0_291\bin” (If you installed it somewhere else, enter your own installation directory).
Step 4.
Enter this command to generate the Keystore.
keytool -genkey -v -keystore ExampleKey.keystore -alias MyKey -keyalg RSA -keysize 2048 -validity 10000
ă…¤
ă…¤
Step 5.
Create a password for your Key Store and answer all the questions that are asked.
If it says [Storing ExampleKey.keystore], everything worked.
ă…¤
ă…¤
Step 6.
Copy the ExampleKey.keystore file from the Java/jre/bin folder into the Build/Android folder.
ă…¤
ă…¤
Step 7.
Go to the Android Project Settings in the Unrel Engine and scroll down to “Distribution Signing”.
Enter the full filename, Alias and password of your Key Store.
ă…¤
ă…¤
Step 8.
Package your game and your savegame should work.
ă…¤
ă…¤
ă…¤
Extra information:
I have often read that people think that the savegame is deleted after an update but that is not the case at least if you update with the apk. I don’t know how it is via the playstore.
I hope this tutorial can help you if I have made any mistakes let me know
ㅤㅤ
ă…¤
ă…¤
I have also made a youtube video that shows all the steps of this tutorial.