Edit
I implemented the TangoCameraPreview by itself in a test app and it works fine. I think this error is being caused by the specific circumstances of my app. I am using Rajawali to render some graphics in my app so that could be it, but I'm not sure...
Original
I'm using the Java API and trying to use the TangoCameraPreview class instead of building my own SurfaceView and Renderer like they do in the examples. But it looks like something is failing on the JNI level and I can't get it working. Sometimes, I'll see the video for a split second, but inevitably I always get the error:
12-30 17:20:03.544 4005-4515/com.gloppygloop W/tango_client_api: TangoErrorType TangoService_updateTexture(TangoCameraId, double*): TangoService got a negative timestamp -1.000000 from camera with id 2.
12-30 17:20:03.546 4005-4515/com.gloppygloop E/TangoCameraPreview: Error updating texture.
com.google.atap.tangoservice.TangoInvalidException
at com.google.atap.tangoservice.Tango.throwTangoExceptionIfNeeded(Tango.java:826)
at com.google.atap.tangoservice.Tango.updateTexture(Tango.java:333)
at com.google.atap.tangoservice.TangoCameraPreview.updateTexture(TangoCameraPreview.java:267)
at com.google.atap.tangoservice.TangoCameraPreview$MainRenderer.onDrawFrame(TangoCameraPreview.java:117)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1523)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
I'm basically just calling the TangoCameraPreview.onFrameAvailable, whenever I have OnFrameAvailable from the OnTangoUpdateListener like they recommend in the docs. As far as I can tell, its just because the JNI method is not able to get a timestamp properly from the camera and that causes an error. I'm trying to use the Fisheye camera, but I've tried the Color camera and the RGBIR camera as well.