/development/samples/ApiDemos/src/com/example/android/apis/os/ |
D | TriggerSensors.java | 69 private SensorManager mSensorManager; field in TriggerSensors 77 if (mSigMotion != null && mSensorManager.requestTriggerSensor(mListener, mSigMotion)) in onResume() 86 if (mSigMotion != null) mSensorManager.cancelTriggerSensor(mListener, mSigMotion); in onPause() 99 mSensorManager = (SensorManager)getSystemService(SENSOR_SERVICE); in onCreate() 100 mSigMotion = mSensorManager.getDefaultSensor(Sensor.TYPE_SIGNIFICANT_MOTION); in onCreate() 110 if (mSigMotion != null) mSensorManager.cancelTriggerSensor(mListener, mSigMotion); in onStop()
|
D | RotationVectorDemo.java | 44 private SensorManager mSensorManager; field in RotationVectorDemo 52 mSensorManager = (SensorManager)getSystemService(SENSOR_SERVICE); in onCreate() 88 mRotationVectorSensor = mSensorManager.getDefaultSensor( in MyRenderer() 102 mSensorManager.registerListener(this, mRotationVectorSensor, 10000); in start() 107 mSensorManager.unregisterListener(this); in stop()
|
/development/samples/ApiDemos/src/com/example/android/apis/graphics/ |
D | SensorTest.java | 32 private SensorManager mSensorManager; field in SensorTest 140 mSensorManager = (SensorManager)getSystemService(Context.SENSOR_SERVICE); in onCreate() 141 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); in onCreate() 144 if (false) Log.d(TAG, "create " + mSensorManager); in onCreate() 150 mSensorManager.registerListener(mListener, mSensor, SensorManager.SENSOR_DELAY_FASTEST); in onResume() 151 if (false) Log.d(TAG, "resume " + mSensorManager); in onResume() 156 mSensorManager.unregisterListener(mListener); in onStop() 158 if (false) Log.d(TAG, "stop " + mSensorManager); in onStop()
|
D | Compass.java | 33 private SensorManager mSensorManager; field in Compass 55 mSensorManager = (SensorManager)getSystemService(Context.SENSOR_SERVICE); in onCreate() 56 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION); in onCreate() 67 mSensorManager.registerListener(mListener, mSensor, in onResume() 75 mSensorManager.unregisterListener(mListener); in onStop()
|
/development/samples/Compass/src/com/example/android/compass/ |
D | CompassActivity.java | 46 private SensorManager mSensorManager; field in CompassActivity 65 mSensorManager = (SensorManager)getSystemService(Context.SENSOR_SERVICE); in onCreate() 77 Sensor gsensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); in onResume() 78 Sensor msensor = mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD); in onResume() 79 mSensorManager.registerListener(this, gsensor, SensorManager.SENSOR_DELAY_GAME); in onResume() 80 mSensorManager.registerListener(this, msensor, SensorManager.SENSOR_DELAY_GAME); in onResume() 89 mSensorManager.unregisterListener(this); in onPause()
|
/development/samples/browseable/JumpingJack/src/com.example.android.wearable.jumpingjack/ |
D | MainActivity.java | 69 private SensorManager mSensorManager; field in MainActivity 92 mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE); in onCreate() 93 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_GRAVITY); in onCreate() 128 if (mSensorManager.registerListener(this, mSensor, in onResume() 139 mSensorManager.unregisterListener(this); in onPause()
|
/development/samples/USB/MissileLauncher/src/com/android/missilelauncher/ |
D | MissileLauncherActivity.java | 50 private SensorManager mSensorManager; field in MissileLauncherActivity 79 mSensorManager = (SensorManager)getSystemService(Context.SENSOR_SERVICE); in onCreate() 80 mGravitySensor = mSensorManager.getDefaultSensor(Sensor.TYPE_GRAVITY); in onCreate() 86 mSensorManager.unregisterListener(mGravityListener); in onPause() 92 mSensorManager.registerListener(mGravityListener, mGravitySensor, in onResume()
|
/development/samples/AccelerometerPlay/src/com/example/android/accelerometerplay/ |
D | AccelerometerPlayActivity.java | 53 private SensorManager mSensorManager; field in AccelerometerPlayActivity 65 mSensorManager = (SensorManager) getSystemService(SENSOR_SERVICE); in onCreate() 337 mSensorManager.registerListener(this, mAccelerometer, SensorManager.SENSOR_DELAY_UI); in startSimulation() 341 mSensorManager.unregisterListener(this); in stopSimulation() 346 mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); in SimulationView()
|