iotivity-lite
iotivity-lite copied to clipboard
Supporting Android API 33
I built the latest iotivity-lite library (NDK21&25, armeabi&arm64-v8a) and applied it to the Android App (OnboardingTool) provided as an example. And when I ran it on a mobile phone (e.g. Galaxy S20+) with Android API 33, the app terminated abnormally.
What Android API version does the latest iotivity-lite run normally on?
@Danielius1922
I am testing the operation of an OCF app by applying the iotivity-lite
library on an Android 13 (API 33) mobile phone.
The iotivity-lite
(commit 4a9fad5) library was built as follows.
$IOTIVITY_LITE_HOME/port/android$ make NDK_HOME=~/toolchains/ndk21-android-arm-23 ANDROID_ABI=armeabi DEBUG=1
However, when I run the app on my Android phone, the following error appears on the LogCat screen.
Native code library failed to load.
2024-06-24 14:16:41.132 System.err W java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "oc_socket_get_address" referenced by "/data/app/~~-jjRYwXqtqnBSl0RUun9Ig==/net.ocf.app.iot-gbQKXIqxJU01yaNfznfRGw==/base.apk!/lib/armeabi/libiotivity-lite-jni.so"...
2024-06-24 14:16:41.143 I System.exit called, status: 1
I checked and there was no oc_socket_get_address()
method definition in the iotivity-lite-jni.so
file.
Could you please fix this error?
@Askidea Unfortunately, we currently don't have an Android maintainer, I'm trying to keep it at least buildable, but what's the functional state of the Android implementation I cannot tell you. The latest issue should be fixed today when I merge this PR - https://github.com/iotivity/iotivity-lite/pull/635 .