|
30 | 30 | import com.google.atap.tangoservice.TangoXyzIjData; |
31 | 31 |
|
32 | 32 | import com.google.atap.tango.ux.TangoUx; |
| 33 | +import com.google.atap.tango.ux.TangoUx.StartParams; |
33 | 34 | import com.google.atap.tango.ux.TangoUxLayout; |
34 | 35 |
|
35 | 36 |
|
@@ -140,9 +141,6 @@ public void onUxExceptionEvent(UxExceptionEvent uxExceptionEvent) { |
140 | 141 | if(uxExceptionEvent.getType() == UxExceptionEvent.TYPE_TANGO_SERVICE_NOT_RESPONDING){ |
141 | 142 | Log.i(TAG, "TangoService is not responding "); |
142 | 143 | } |
143 | | - if(uxExceptionEvent.getType() == UxExceptionEvent.TYPE_TANGO_UPDATE_NEEDED){ |
144 | | - Log.i(TAG, "Device not running on ART"); |
145 | | - } |
146 | 144 | if(uxExceptionEvent.getType() == UxExceptionEvent.TYPE_UNDER_EXPOSED){ |
147 | 145 | Log.i(TAG, "Camera Under Exposed " ); |
148 | 146 | } |
@@ -179,9 +177,9 @@ protected void onCreate(Bundle savedInstanceState) { |
179 | 177 | mConfig = mTango.getConfig(TangoConfig.CONFIG_TYPE_CURRENT); |
180 | 178 | mConfig.putBoolean(TangoConfig.KEY_BOOLEAN_DEPTH, true); |
181 | 179 |
|
182 | | - mTangoUx = new TangoUx.Builder(this).build(); |
| 180 | + mTangoUx = new TangoUx(this); |
183 | 181 | mTangoUxLayout = (TangoUxLayout) findViewById(R.id.layout_tango); |
184 | | - mTangoUx = new TangoUx.Builder(this).setTangoUxLayout(mTangoUxLayout).build(); |
| 182 | + mTangoUx.setLayout(mTangoUxLayout); |
185 | 183 | mTangoUx.setUxExceptionEventListener(mUxExceptionListener); |
186 | 184 |
|
187 | 185 |
|
@@ -221,7 +219,8 @@ protected void onPause() { |
221 | 219 | @Override |
222 | 220 | protected void onResume() { |
223 | 221 | super.onResume(); |
224 | | - mTangoUx.start(); |
| 222 | + StartParams params = new StartParams(); |
| 223 | + mTangoUx.start(params); |
225 | 224 | if (!mIsTangoServiceConnected) { |
226 | 225 | startActivityForResult( |
227 | 226 | Tango.getRequestPermissionIntent(Tango.PERMISSIONTYPE_MOTION_TRACKING), |
@@ -254,7 +253,7 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) { |
254 | 253 | mIsTangoServiceConnected = true; |
255 | 254 | } catch (TangoOutOfDateException outDateEx) { |
256 | 255 | if (mTangoUx != null) { |
257 | | - mTangoUx.onTangoOutOfDate(); |
| 256 | + mTangoUx.showTangoOutOfDate(); |
258 | 257 | } |
259 | 258 | } catch (TangoErrorException e) { |
260 | 259 | Toast.makeText(getApplicationContext(), R.string.TangoError, Toast.LENGTH_SHORT) |
@@ -396,7 +395,7 @@ public void onXyzIjAvailable(final TangoXyzIjData xyzIj) { |
396 | 395 | @Override |
397 | 396 | public void onTangoEvent(final TangoEvent event) { |
398 | 397 | if(mTangoUx!=null){ |
399 | | - mTangoUx.onTangoEvent(event); |
| 398 | + mTangoUx.updateTangoEvent(event); |
400 | 399 | } |
401 | 400 | runOnUiThread(new Runnable() { |
402 | 401 | @Override |
|
0 commit comments