Skip to content
This repository was archived by the owner on Jun 29, 2021. It is now read-only.
This repository was archived by the owner on Jun 29, 2021. It is now read-only.

Migration to IoTivity-lite ( e6ba0bb ) App never leaves SplashActivity #2

Description

@fercamp09

Hello, I am trying to run the App at the commit Migration to IoTivity-lite ( e6ba0bb ), but I have encountered some issues:

  1. Cannot open a library at 'FileMapping(from=.../otgc/src/main/jniLibs/iotivity-lite.jar): I solved this by
# Updating the iotivity-lite submodule
$ cd otgc-android/extlibs/
$ git submodule init
$ git submodule update
$ cd iotivity-lite
$ git submodule init
$ git submodule update

# Install a standalone toolchain of the ndk
$ cd ~/Android/Sdk/ndk-bundle/build/tools
$ ./make_standalone_toolchain.py --arch arm --api 23 --install-dir ~/android-arm-23

# Build iotivity-lite.jar using the standalone toolchain
$ cd port/android
$ make NDK_HOME=~/android-arm-23/  ANDROID_API=23

# Copy the generated files to the android project under the jniLibs folder(otgc)
$ mkdir ~/Documents/otgc-android/otgc/src/main/jniLibs/
$ mkdir ~/Documents/otgc-android/otgc/src/main/jniLibs/armeabi-v7a/
$ cp ~/otgc-android/extlibs/iotivity-lite/swig/iotivity-lite-java/libs/libiotivity-lite-jni.so ~/otgc-android/otgc/src/main/jniLibs/armeabi/
$ cp ~/otgc-android/extlibs/iotivity-lite/swig/iotivity-lite-java/libs/iotivity-lite.jar ~/otgc-android/otgc/src/main/jniLibs/
  1. Now it compiles and runs, but stays in the Splash indefinitely. I am not sure if I am doing something wrong or if I am missing something. I tried compiling iotivity-lite for various architecture (arm64, x86_64) but only arm works, so I use it. I would like to know how can I make it work.

Test Android Devices:

  • Samsung Tab S3, Android 8.0.0, API: 26, arch: arm64-v8a
  • Samsung Galaxy S4, Android 5.0.1, API: 21, arch: armeabi-v7a

Android Studio 3.4:

  • Build #AI-183.5429.30.34.5452501, built on April 9, 2019
  • JRE: 1.8.0_152-release-1343-b16-5323222 amd64
  • JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
  • Linux 4.15.0-47-generic

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions