关于新Tango()的信息

时间:2016-04-13 03:38:58

标签: google-project-tango

我已经下载了演示“java_quick_start_example”。 1.我直接运行应用程序,但它失败了。日志描述为 TangoErrorType TangoService_initialize (JNIEnv*, jobject): Done initializing, error code = -1 2.我修改代码如下

 mTango = new Tango(this, new Runnable() {
            @Override
            public void run() {
          }
 });

也失败了。该日志描述为"Error - TangoService_connectOnPoseAvailable: -1"

1 个答案:

答案 0 :(得分:0)

来自Tango的一些例子示例:

 mTango = new Tango(MotionTrackingActivity.this, new Runnable() {
        // Pass in a Runnable to be called from UI thread when Tango is ready,
        // this Runnable will be running on a new thread.
        // When Tango is ready, we can call Tango functions safely here only
        // when there is no UI thread changes involved.
        @Override
        public void run() {
            mConfig = setupTangoConfig(mTango);

            try {
                setTangoListeners();
            } catch (TangoErrorException e) {
                Log.e(TAG, getString(R.string.exception_tango_error), e);
            } catch (SecurityException e) {
                Log.e(TAG, getString(R.string.permission_motion_tracking), e);
            }
            try {
                mTango.connect(mConfig);
            } catch (TangoOutOfDateException e) {
                Log.e(TAG, getString(R.string.exception_out_of_date), e);
            } catch (TangoErrorException e) {
                Log.e(TAG, getString(R.string.exception_tango_error), e);
            }
        }
    });
}