I am working on creating a native shared library for an older android API level. I am able to invoke functions in the library from client code.
But I need to use some image files in the shared library. The reference 1 && 3 mentioned a way to access resource files by using java code. My question is: is there a way allowing me to use (something like fopen(res_path)) c/c++ function to open resource files?
The library source structure is:
.
├── AndroidManifest.xml
├── Android.mk
├── Application.mk
├── res
│ └── drawable
│ ├── 0.jpg
│ ├── 1.jpg
│ ├── ...
│ └── 9.jpg
├── MyApp.cpp
└── MyApp.h
Thanks in advance
environment:
ndk ver : ndk-r12b
compiler: gcc c/c++ 4.9.x
AOSP : 5.1.1_r30
API level: 22
references: