Download

Including and referencing additional files from the Android filesystem (Java side)

Hello,
I am struggling to package and reference additional file dependencies, for an android build.
I need for my Java classes to reference files within the Android file system. (eg. “data/data/[com.my.package]”).
When I package and install a build, my content folders are not added in the above data path (despite whatever content folders I have added to the selection in the Android tab).
I feel I have tried every which combination, and yet the “data/data/[com.my.package]”" remains an empty, but existing folder.
Am I supposed to package the files within the .OBB, to have them extracted out? and if so, how would I go about doing that?
I can see that my content folder exists in the OBB, but it seems I am unable to open it from Activity class (despite the path appearing to be valid).
If someone who knows could reply/or PM me, I would be VERY thankful.
This relates to porting across a speech recognition plugin into Android.

Hi ShaneC,

If you need something in the APK from Java you could make an assets directory in your project’s Build/Android directory and put your files there. The AssetManager can access them:

https://developer.android.com/reference/android/content/res/AssetManager.html