I’m no very familiar wih Android development. At this moment I have NDK shared library(.so), header files for it (.h), and .jar library. I don’t have linux library (.a). So, this pack of files is enough to create ThirdParty for Android? I already create few ThirdParty for Win, with static and dynamic libraries, but I have no idea how to do same for Android. Can i use PublicDelayLoadDLLs for “.so”?
Solved. There is no way to create ThirdParty for android using Java libs. It’s only C++.
Instead, i can edit “UE4 Java Activity”, e.g. “Engine\Build\Android\Java\src\com\epicgames\ue4\GameActivity.java” and include into it whatever i need. Also, for we must edit “Android.mk”.
In “Android.mk”:
include $(CLEAR_VARS)
LOCAL_MODULE := Vuforia-prebuilt
LOCAL_SRC_FILES = C:\NVPACK\vuforia-sdk-android-3-0-5_0\build\lib\armeabi-v7a\libVuforia.so
LOCAL_EXPORT_C_INCLUDES := C:\NVPACK\vuforia-sdk-android-3-0-5_0\build\include
include $(PREBUILT_SHARED_LIBRARY)
And ofcourse create “Java/libs” folder and put *.jar into it.
Finally with connected lib (tested - all is OK) i can use JNI methods to access Java from C++. There are still a lot of work: per class C+±>Java communication and engine-dependend template creation. Have something to do for few next weeks.
Almost same here. I am trying to load some dynamic external library. I have .so and .h for function signatures and .aar , but for the life of me i can’t figure out how to link it to the packaged .apk . Your answer is outdated a bit, can anyone please share link to documentation how to do it at least on 4.16 pls?