Android - Path to Content Dir from Java code
I'm adding some Java files to my Android project and using UPL to add them into the build.
Using the relative path from GetProjectContentDir does not seem to work. Looking around some of the engine's java code, I've tried plugging in a bunch of different variables and paths, but none seem to point to the right place (InternalFilesDir, ExternalFilesDir, Context.GetDataDir(), Context.GetFilesDir(), many others).
Poking around in the apk, I've found the files inside main.obb.png, in ProjectName/Content/.
asked Apr 03 '19 at 04:52 PM in Using UE4
In case anyone else has this problem in the future, the fundamental problem I was running into was assuming that the files I was looking for would exist in the filesystem on the android device. The Unreal File System tools do some obfuscation, and the files don't actually exist on the file system in same manner as they would on PC/Mac.
Because my Java library needs to read a file off the filesystem this is problematic. So to solve this, in my project's c++ code I'm reading these files using the UE4 tools, and then writing them to location on the file system.
Follow this question
Once you sign in you will be able to subscribe for any updates here