Home
last modified time | relevance | path

Searched refs:mSensorManager (Results 1 – 8 of 8) sorted by relevance

/development/samples/ApiDemos/src/com/example/android/apis/os/
DTriggerSensors.java69 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()
DRotationVectorDemo.java44 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/
DSensorTest.java32 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()
DCompass.java33 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/
DCompassActivity.java46 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/
DMainActivity.java69 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/
DMissileLauncherActivity.java50 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/
DAccelerometerPlayActivity.java53 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()