Hello,
I'm trying to load .so files based on the version of Android I am
running.
My app has some native functions to do with rendering that are
dependent on the version of Android. I have 2 .so files to load at
runtime : The first file is libAppJNI.so, the second is
libAppRenderer.so
When running on a single version of Android (say Android 2.) I've
successfully set up my code like this :
* Build two .so's
* Let the android build system build and package libAppJNI.so and
libAppRenderer2.2.so
* libAppJNI.so has a dependency on
libAppRenderer2.2.so
* Call System.load("
libAppRenderer2.2.so") before
System.load("libAppJNI.so")
My app runs successfully on Android 2.2
Now, my questions that I'm hoping someone has answers for :
*How do I package multiple versions of the libAppRenderer?
* Do I name these differently like libAppRenderer16,
libAppRenderer21, libAppRenderer22?
* But then, what is libAppJNI built with?
* Do I name them the same name and built libAppJNI with
libAppRenderer?
* How do I package these? Store it with these paths in the
archive? : libs/libAppJNI.so, libs/android22/libAppRenderer.so, libs/
android21/libAppRenderer.so?
Is there an example of a JNI app that does this : load a version of a
library and then a common library?
Thanks!