I am facing a problem in one of my app, I have the following code to load a lib (JNI) the app needs :
static {
// load the JNI library
Log.i("JNI", "loading JNI library...");
System.load("/data/data/com.mypackage.appname/lib/libxxxxxx.so");
Log.i("JNI", "JNI library loaded!");
}
So i get get the warning : "Do note hardcode use Context.getFilesDir().getPath() instead"
which is totally rightful (It's not going to be portable on every devices). The thing is, because I am using static I can't call for Context.getFilesDir().getPath()
.
Do you have any ideas on how I can proceeded to do it ?