Home Forums Legacy SDKs Getting started with GazeSDK: Linking error Reply To: Getting started with GazeSDK: Linking error

#5055
mar
Participant

@Grant, at this point, I’m just trying to familiarize myself with the interface, but ultimately, I would like to read gaze position data from a connected Android device every 20th of a second or so.

I believe that in order to do that, I need to:

  1. instantiate an EyeTracker with the REX’s URL
  2. set a callback handler on the tracker
  3. establish a connection to the REX

I wished to use Discovery.getConnectedEyeTracker so that I could avoid requiring user input or a hardcoded URL to instantiate the EyeTracker, but if I have understood you, this is not an option on Android.

So I have modified my inchoate code to try new EyeTracker("tobii-ttp://REXDL-030114044623"), but my app still crashes as soon as I run the relevant code. I get an unsatisfied link error, just as in my original post. Here is the more lengthy error from the log:


04-18 12:30:47.348 32282 32282 E AndroidRuntime: FATAL EXCEPTION: main
04-18 12:30:47.348 32282 32282 E AndroidRuntime: Process: edu.ucdavis.auditoryenhancer, PID: 32282
04-18 12:30:47.348 32282 32282 E AndroidRuntime: java.lang.UnsatisfiedLinkError: No implementation found for void com.tobii.gaze.core.TobiiGazeCoreModuleJNI.swig_module_init() (tried Java_com_tobii_gaze_core_TobiiGazeCoreModuleJNI_swig_1module_1init and Java_com_tobii_gaze_core_TobiiGazeCoreModuleJNI_swig_1module_1init__)
04-18 12:30:47.348 32282 32282 E AndroidRuntime: 	at com.tobii.gaze.core.TobiiGazeCoreModuleJNI.swig_module_init(Native Method)
04-18 12:30:47.348 32282 32282 E AndroidRuntime: 	at com.tobii.gaze.core.TobiiGazeCoreModuleJNI.<clinit>(TobiiGazeCoreModuleJNI.java:535)
04-18 12:30:47.348 32282 32282 E AndroidRuntime: 	at com.tobii.gaze.core.EyeTracker.<init>(EyeTracker.java:39)
04-18 12:30:47.348 32282 32282 E AndroidRuntime: 	at edu.ucdavis.auditoryenhancer.eyetracker.EyeTrackerActivity.onCreate(EyeTrackerActivity.java:33)
04-18 12:30:47.348 32282 32282 E AndroidRuntime: 	at android.app.Activity.performCreate(Activity.java:6237)
04-18 12:30:47.348 32282 32282 E AndroidRuntime: 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
04-18 12:30:47.348 32282 32282 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
04-18 12:30:47.348 32282 32282 E AndroidRuntime: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
04-18 12:30:47.348 32282 32282 E AndroidRuntime: 	at android.app.ActivityThread.-wrap11(ActivityThread.java)
04-18 12:30:47.348 32282 32282 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
04-18 12:30:47.348 32282 32282 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:102)
04-18 12:30:47.348 32282 32282 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:148)
04-18 12:30:47.348 32282 32282 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:5417)
04-18 12:30:47.348 32282 32282 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
04-18 12:30:47.348 32282 32282 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
04-18 12:30:47.348 32282 32282 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

I’m sorry. It looks like I’m not linking the gaze library correctly. Here’s how I set up the libtobiigazecore-jni module, which I try to load with a call to System.loadLibrary("libtobiigazecore-jni"):


include $(CLEAR_VARS)
LOCAL_MODULE := libtobiigazecore-jni
LOCAL_SRC_FILES := ../libs/Tobii/TobiiGazeSdk-JavaApi-1.0.0.86-android-armeabi-v7a/armeabi-v7a/libtobiigazecore-jni.so
include $(BUILD_SHARED_LIBRARY)