Hi.
I'm creating a B4A library that uses a native .so filetype library.
There are two versions of the native library, in the Eclipse project libs folder they are stored as:
libs / armeabi / liblame.so
libs / armeabi-v7a / liblame.so
I can compile the B4A library so that the libs folder is included in the exported jar, and when i compile my B4A project and open the compiled .apk file i see my libs folder and both versions of the .so library files.
So i need to manually copy the correct version of the .so library file to the project's installed location.
I hoped to do this in the library, in the library class constructor but cannot find out:
1) How to access the APK libs folder?
2) How to detect if armeabi or armeabi-v7a version should be copied?
A solution would be to remove the .so files from the B4A library .jar and add them to the project's Files folder i though BUT we have no support for sub-folders in the Files folder and obviously cannot have 2 .so files with the same filename in the Files folder.
And it's a requirement of .so library files to be named according to the library name - i can't rename one of the .so files.
Once i have a solution for this i still need to be able to establish whether a device supports the armeabi-v7a version of the library or not.
Ideally the B4A compiler would do all of this automatically but that's not currently supported.
So i'll add this as a new feature request and also ask if anyone has any workarounds or other solutions to enable me to copy the correct .so library version to the installed app's internal lib folder?
Thanks.
Martin.
I'm creating a B4A library that uses a native .so filetype library.
There are two versions of the native library, in the Eclipse project libs folder they are stored as:
libs / armeabi / liblame.so
libs / armeabi-v7a / liblame.so
I can compile the B4A library so that the libs folder is included in the exported jar, and when i compile my B4A project and open the compiled .apk file i see my libs folder and both versions of the .so library files.
So i need to manually copy the correct version of the .so library file to the project's installed location.
I hoped to do this in the library, in the library class constructor but cannot find out:
1) How to access the APK libs folder?
2) How to detect if armeabi or armeabi-v7a version should be copied?
A solution would be to remove the .so files from the B4A library .jar and add them to the project's Files folder i though BUT we have no support for sub-folders in the Files folder and obviously cannot have 2 .so files with the same filename in the Files folder.
And it's a requirement of .so library files to be named according to the library name - i can't rename one of the .so files.
Once i have a solution for this i still need to be able to establish whether a device supports the armeabi-v7a version of the library or not.
Ideally the B4A compiler would do all of this automatically but that's not currently supported.
So i'll add this as a new feature request and also ask if anyone has any workarounds or other solutions to enable me to copy the correct .so library version to the installed app's internal lib folder?
Thanks.
Martin.