Support for RealSense on Android Added!


#1

We are glad to announce the new version of Nuitrack SDK!

Support for RealSense on Android was added in Nuitrack v0.26.0.

  • Recommended RealSense D415/D435 firmware version is 5.11.1.0
  • Rooted and non-rooted devices can be used
  • USB-OTG support is required.
  • RealSense D415 and D435 were tested with the following Android devices:
    Odroid XU3 (Android 4.4.4 Kitkat) (rooted)
    Samsung Galaxy S4 (Android 5 Lollipop) (non-rooted)
    Samsung Galaxy S5 (Android 6 Marshmallow) (non-rooted)
    Samsung Galaxy S6 (Android 7 Nougat) (non-rooted)
    Samsung Galaxy S8/S8+ (Android 8 Oreo) (non-rooted)

Coming soon:

  • Biometric ID (Face Recognition)
  • Annual online license (without linking to the sensor)
  • Nuitrack AI - New generation algorithms based on deep learning

#2

#3

How do you connect Android device to Interealsense? cable?


#4

Dear Overly,

Yes, using cable.


#5

Hello I am trying to build an Android app with your SDK. I have already put two solid days into getting it to build. I have learned and now have NDK working to give me JNI access to your CPP files and library.

My final hurdle seems to be the ‘GLUT*’ calls you make.

app/src/main/cpp/main.cpp
use of undeclared identifier ‘glutGetWindow’

and 18 other messages for different identifiers.

I tried updating the ‘includes’ in NuitrackGLSample.h…

#ifndef ANDROID
#include <GL/gl.h>
#else
//#include <GLES/gl.h>
#include<GLES2/gl2.h>
#include<GLES2/gl2ext.h>
#include<GLES2/gl2platform.h>

#endif

and amended this in to my CMakeLists.txt

find_library(gles-lib GLESv2_CM)

I am using Android Studio 3.5.2, I followed the instructions here

, but needed to do things a little differently as your instructions didn’t make sense in the latest android studio.

I cannot see where to put the C++ exception you discuss in the instructions?

Please help me :slight_smile:


#6

Hi GazRideGuide,

please refer to the instructions for Android Studio 3.5 https://docs.google.com/document/d/1eGLJ_GMvvafJn7IYJuqFfhN0S3pdF2cWS1bAxT0x84Y

C++ exception flag should be put to Gradle Scripts -> build.gradle (Module: app) file, section android.defaultConfig.externalNativeBuild.cmake:

cmake {
    cppFlags "-std=c++11 -fexceptions"
}

Let me know if you have new questions.


#7

THANK YOU SO MUCH! Trying this now. Very Excited!

I am following this step…

Delete .cpp files from folder /app/src/main/cpp/ and add the scripts android_main.cpp, NuitrackGLSample.cpp, and NuitrackGLSample.h from Nuitrack SDK to the /app/src/main/cpp/ folder.

I cannot find android_main.cpp.

I can only find main.cpp in the folder alongside NuitrackGLSample.cpp, and NuitrackGLSample.h in the Examples/NuitrackGLSample folder that came with the SDK.

What should I do?


#8

I renamed main.cpp which I pulled from theNuitrackGLSample.

I followed all the other instructions to the letter.

I have built the project and receive the following error which was stopping the build

android_main.cpp (1 error)
‘GL/glut.h’ file not found.

So I commented out that ‘include’ in android_main.cpp; I noticed the NuitrackGLSample.h was already including what looked like more relevant GLES headers.

Then when I try to rebuild I receive more error messages…

from the build output window…

android_main.cpp (18 errors)
use of undeclared identifier ‘glutGetWindow’
use of undeclared identifier ‘GLUT_LEFT_BUTTON’
use of undeclared identifier ‘GLUT_DOWN’
use of undeclared identifier ‘glutGetWindow’
use of undeclared identifier ‘glutSwapBuffers’
use of undeclared identifier ‘glutPostRedisplay’
use of undeclared identifier ‘glutInit’

Nearly there!


#9

What I didn’t mention is that I am running Android Studio on macOS Catalina


#10

Hi GazRideGuide,

I cannot find android_main.cpp.

please refer to <NuitrackSDK_path>/Examples/nuitrack_gl_sample/android/jni/android_main.cpp.