I need to distribute an application (a player), which depends on a native library built for a given ARM version and extension (Tegra, Neon). This native library is quite large so I can’t distribute all its versions in one universal package. So I decided to split the application into one small universal .apk and more specialized .apks – plug-ins without any activities.
How can I access a specialized native shared library in the plug-in app from the main host application? Is it possible to use simply
System.loadLibrary("path_to_library");
If so, how can I get the path to that library?
How to solve this problem in case it is not possible?
System.loadLibrary()
takes a library name and maps it to a full path somehow.
foo => libfoo.so
The system normally checks the apk itself and then usually /system/lib/
If you have a full path, use System.load()
In any case it will be a hassle to manage the location of your lib unless it's either in the apk or with all the system libs.
I'd just pack the specific lib with the apk.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With