I use EyeTribe for a long time without problem. But with the new SDK v.0.9.60 I have trouble because I can not get the gaze data from the camera. The method "onGazeUpdate" is never called.
I have tried for example the code from the developer site (http://dev.theeyetribe.com/java/). I did this: I created a new project in eclipse, add "eyetribe-java-0.9.60.jar" (downloaded from https://github.com/EyeTribe/tet-java-client/releases) to the build path, created a new class with the mentioned code and run it. But the "onGazeUpdate" method is never called. Is the code OK? It is copied from here - I just deleted "ApiVersion.VERSION_1_0, ClientMode.PUSH" because it seem it is not compatible with new API.
The code works with older SDK (only imports have to be changed, because of the new structure of the new SDK). Here is the code:
- Code: Select all
package com.theeyetribe.javafx;
import com.theeyetribe.clientsdk.GazeManager;
import com.theeyetribe.clientsdk.IGazeListener;
import com.theeyetribe.clientsdk.data.GazeData;
public class TETSimple {
public static void main(String[] args) {
final GazeManager gm = GazeManager.getInstance();
boolean success = gm.activate();
final GazeListener gazeListener = new GazeListener();
gm.addGazeListener(gazeListener);
Runtime.getRuntime().addShutdownHook(new Thread() {
@Override
public void run() {
gm.removeGazeListener(gazeListener);
gm.deactivate();
}
});
}
private static class GazeListener implements IGazeListener {
@Override
public void onGazeUpdate(GazeData gazeData) {
System.out.println(gazeData.toString());
}
}
}
What I am doing wrong? The EyeTribe works perfectly if I try to run for example the "EyeTribeJavaFx.jar" from https://github.com/EyeTribe/tet-java-client/releases. But it doesnt work with my own code.