Android: how to use local libraries
-
Hi all,
maybe a seely question, but I want to know if it is possible to use a locally available C++ library with Qt for Android?
I've got some huge libraries which are stored somewhere in the internal storage of my Android device (/sdcard/myLibs/).
I don't want to add those libraries in the APK, is it possible to define a kind of "extra libraries path"?Thanks for any suggestion
Fabrice
-
@KroMignon said in Android: how to use local libraries:
I don't want to add those libraries in the APK
Why not? If your app is linked against these libs your APK will not work without them.
Or do you load these libs dynamically at runtime? -
@KroMignon The problem I see: APK will not work without these libs, so how are you going to distribute your apps? I'm not an expert but I'm quite sure this is not supported by Android because of security: apps can only execute what is part of APK and nothing else (sandbox).
-
@KroMignon OK, understand.
I'm not sure this is possible with not rooted devices because of sandboxing, but I'm not expert. -
@KroMignon You should be able to do it the same way that Ministro does it. The libraries have to be in a readable location. I think Ministro puts the Qt libraries in /data/local/tmp/qt, but anywhere under /data should work. Then you would have to dynamically load them. I don't think /sdcard/myLibs would work.
-
@Tom_H said in Android: how to use local libraries:
@KroMignon You should be able to do it the same way that Ministro does it. The libraries have to be in a readable location. I think Ministro puts the Qt libraries in /data/local/tmp/qt, but anywhere under /data should work. Then you would have to dynamically load them. I don't think /sdcard/myLibs would work.
The problem is that recent version of Android disabled the access to such shared folder so it can't be used anymore.
-
-
@kromignon Since Android is based on Linux you could put the libs in /usr/lib and see whether it works.