I need to distribute an application on Google Play.
However, my application has a library that accesses 10 “.dat” files.
The problem is that distribute these dats files. In the assets directory i tried unzip, but, the library “.so” cannot access them: permissions issues.
I thought about the possibility of putting them in the raw directory, but I do not know if it would work, because I use the NDK to make the link and do not know if it would have the lib directory permissions on this project.
Would not nice store in sdcard. The user could delete the files…
What should I do?
Put all your .dat files into the
assetsfolder (at the same level where you havesrcandjni). Ant will pack them into the.apkarchive.If you target Android 2.3+ you can access your files directly with NDK calls. If you want to run on lower versions of Android your have 2 possibilities:
minizip(or similar zip unpacker) to access the files withinthe
.apkarchive