Sensors Overview - Android Developers
Sensors Overview - Android Developers
1 of 16
http://developer.android.com/guide/topics/sensors/sensors_overview.html
Sensor
SensorEvent
SensorManager
SensorEventListener
02-02-2016 12:53
2 of 16
http://developer.android.com/guide/topics/sensors/sensors_overview.html
02-02-2016 12:53
3 of 16
http://developer.android.com/guide/topics/sensors/sensors_overview.html
TYPE_ACCELEROMETER
TYPE_AMBIENT_TEMPERATURE
TYPE_GRAVITY
TYPE_GYROSCOPE
TYPE_LIGHT
TYPE_LINEAR_ACCELERATION
02-02-2016 12:53
4 of 16
http://developer.android.com/guide/topics/sensors/sensors_overview.html
TYPE_MAGNETIC_FIELD
TYPE_ORIENTATION
getRotationMatrix()
TYPE_PRESSURE
TYPE_PROXIMITY
TYPE_RELATIVE_HUMIDITY
TYPE_ROTATION_VECTOR
TYPE_TEMPERATURE
02-02-2016 12:53
5 of 16
http://developer.android.com/guide/topics/sensors/sensors_overview.html
TYPE_AMBIENT_TEMPERATURE
android.hardware
SensorManager
Sensor
SensorEvent
SensorEventListener
02-02-2016 12:53
6 of 16
http://developer.android.com/guide/topics/sensors/sensors_overview.html
TYPE_ACCELEROMETER
TYPE_AMBIENT_TEMPERATURE
02-02-2016 12:53
7 of 16
http://developer.android.com/guide/topics/sensors/sensors_overview.html
TYPE_GRAVITY
TYPE_GYROSCOPE
TYPE_LIGHT
TYPE_LINEAR_ACCELERATION
TYPE_MAGNETIC_FIELD
TYPE_ORIENTATION
TYPE_PRESSURE
TYPE_PROXIMITY
TYPE_RELATIVE_HUMIDITY
TYPE_ROTATION_VECTOR
TYPE_TEMPERATURE
SensorManager
getSystemService()
SENSOR_SERVICE
getSensorList()
TYPE_ALL
02-02-2016 12:53
8 of 16
TYPE_ALL
TYPE_LINEAR_ACCELERATION
http://developer.android.com/guide/topics/sensors/sensors_overview.html
TYPE_GYROSCOPE
TYPE_GRAVITY
getDefaultSensor()
Sensor
getResolution()
getMaximumRange()
getPower()
getVendor()
getVersion()
02-02-2016 12:53
9 of 16
http://developer.android.com/guide/topics/sensors/sensors_overview.html
getMinDelay()
getMinDelay()
getMinDelay()
getMinDelay()
02-02-2016 12:53
10 of 16
http://developer.android.com/guide/topics/sensors/sensors_overview.html
SensorEventListener
onAccuracyChanged()
onSensorChanged()
onAccuracyChanged()
Sensor
SENSOR_STATUS_ACCURACY_LOW
SENSOR_STATUS_ACCURACY_MEDIUM
SENSOR_STATUS_ACCURACY_HIGH
SENSOR_STATUS_UNRELIABLE
onSensorChanged()
SensorEvent
SensorEvent
onSensorChanged()
TextView
sensor_data
02-02-2016 12:53
11 of 16
http://developer.android.com/guide/topics/sensors/sensors_overview.html
SENSOR_DELAY_NORMAL
registerListener()
onSensorChanged()
SENSOR_DELAY_GAME
SENSOR_DELAY_UI
SENSOR_DELAY_FASTEST
onResume()
onPause()
02-02-2016 12:53
12 of 16
http://developer.android.com/guide/topics/sensors/sensors_overview.html
02-02-2016 12:53
13 of 16
http://developer.android.com/guide/topics/sensors/sensors_overview.html
<usesfeature>
<uses-feature>
<uses-feature android:name="android.hardware.sensor.accelerometer"
android:required="true" />
android:required="true"
<uses-feature>
android:required="false"
02-02-2016 12:53
14 of 16
http://developer.android.com/guide/topics/sensors/sensors_overview.html
getRotation()
remapCoordinateSystem()
getOrientation()
getRotationMatrix()
02-02-2016 12:53
15 of 16
http://developer.android.com/guide/topics/sensors/sensors_overview.html
onPause()
unregisterListener(SensorEventListener)
onSensorChanged(SensorEvent)
onSensorChanged(SensorEvent)
onSensorChanged(SensorEvent)
TYPE_ORIENTATION
getOrientation()
TYPE_TEMPERATURE
TYPE_AMBIENT_TEMPERATURE
02-02-2016 12:53
16 of 16
http://developer.android.com/guide/topics/sensors/sensors_overview.html
registerListener()
English
02-02-2016 12:53