Problem with the new SDK v.0.9.60

Forum for development in the Java programming language.

Problem with the new SDK v.0.9.60

Postby honzzyk » 06 Feb 2016, 15:27

Hello,

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.
honzzyk
 
Posts: 2
Joined: 13 Feb 2015, 17:24

Re: Problem with the new SDK v.0.9.60

Postby honzzyk » 06 Feb 2016, 19:35

OK, solved - on github was wrong version of the jar file. Now it works.
honzzyk
 
Posts: 2
Joined: 13 Feb 2015, 17:24


Return to Java



cron