How can I obtain the path to library assets from the main app? Where in the filesystem are assets stored?
In my Android Studio (1.1.0) project I have app and library modules like so:
project
- [lib]
- src
- main
- assets // <--
- hello.txt
- java
- jni // native files
- [app]
- src
- main
- java
I wasn't able to access the assets by calling getFilesDir().getPath() + "hello.txt"
which resolves to something like "/data/data/com.package.app/files/hello.txt"
Does gradle
merge library and app assets automatically? Do I need to modify build.gradle
in my lib or app?
The reason I need the path is so that I can access the assets from the NDK
.