title: JNI loading : Warning : Do not hardcode use Context.getFilesDir().getPath() instead
body: <p>I am facing a problem in one of my app, I have the following code to load a lib (JNI) the app needs :</p>
  
  <pre><code>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!");
  }
  </code></pre>
  
  <p>So i get get the warning : <code>"Do note hardcode use Context.getFilesDir().getPath() instead"</code> 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 <code>Context.getFilesDir().getPath()</code>.</p>
  
  <p>Do you have any ideas on how I can proceeded to do it ?</p>