When I check the checkbox “Use ExternalFilesDir for UE4Game files?” for my Android app, shipping build, deployed to an Android API 25 platform (Oculus Quest), my app is able to successfully save/load UE4 SaveGame files, BUT I am unable to manually access theses files on the device when connected to a PC or Mac file browser.
I want to be able to backup my SaveGame files to another computer as well as manually load some SaveGame files onto the Android device from another computer. Therefore, I need the SaveGame files to be publicly accessible to the user of the Android device. Is there a way to make these SaveGame files visible to the Android user outside of the app?
It seems that while these files are visible to my UE4 app, they are invisible to the user. This situation sounds similar to the function of Android’s Scoped Storage system (files created by your Android app are only accessible to your app, but not the user or other apps.) I also attempted to opt out of Scoped Storage by setting the Android manifest application tag requestLegacyExternalStorage to true also adjusting my app’s Target API to 29, but still the same result (files are invisible to the user).
When “Use ExternalFilesDir” is checked, I believe the intended SaveGame directory is:
When “Use ExternalFilesDir for UE4Game files?” is unchecked, and I have requested necessary Android permissions (READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE), the SaveGame files ARE visible in /UE4Game/[project_name]/[project_name]/Saved/SaveGames/, but ideally, I would like the SaveGames to be erased when the app is uninstalled. When “Use ExternalFilesDir for UE4Game files?” is unchecked, the SaveGame files do not get erased.
I have also a similar problem… When Use ExternalFilesDir is checked (or uncheck, doesnt matter), the files are saved to Ue4Games/[Project name] on Android… which is really annoying, and it’s asking for permission to the storage all the time…
I would really love to have the files saved in Android/Data/com.[companyname].projectname…
It is possible to achieve what you want! Make sure ExternalFilesDir is checked, and then make sure you package “Shipping” build. This will not work if you use the Project Launcher button in UE4 or package a “Development” build. You’ll need to go to Project Settings → Packaging Settings and set that you want a Shipping build, then package the project (File->Package Project->Android), and manually load the built APK onto the Android device using ADB (or another tool).
Maybe there is a way to have UE4 load the APK onto the device for a shipping build, but I am not familiar with this.
thank you very much! I get it now and it works perfectly!
To manually load the apk, if I package the game data inside apk (checkbox), i can now install the app directly on the phone (this is perfect to install a shipping build without the playstore and without ADB.