Integrate Google Maps Android
Integrate Google Maps Android
ANDROID TRAINING
LESSON 13
Version 0.1
• Android Sensors
• Sensor Coordinate System
• Sensor Manager
• Monitoring Sensor Events
• Accelerometers
• Orientation
• API (I.)
– Package: android.hardware
– Classes:
• SensorManager – android service
• Sensor – specific sensor
• SensorEvent – specific event of the sensor = data
• The Sensor Manager includes constants to help identify the sensor triggering the
change event. The following list includes the sensors for which constants are
currently defined. Some or all of these sensors will be available to your
applications depending on the hardware available on the host device:
– SensorManager.SENSOR_ACCELEROMETER Is an accelerometer sensor that returns the
current acceleration along three axes in meters per second squared (m/s2). The
accelerometer is explored in greater detail later in this chapter.
– SensorManager.SENSOR_ORIENTATION Is an orientation sensor that returns the current
orientation on three axes in degrees. The orientation sensor is explored in greater detail
later in this module.
– SensorManager.SENSOR_LIGHT Is an ambient-light sensor that returns a single value
describing the ambient illumination in lux.
– SensorManager.SENSOR_MAGNETIC_FIELD Is a sensor used to determine the current
magnetic field measured in microteslas (μT) along three axes.
– SensorManager.SENSOR_PROXIMITY Is a proximity sensor that returns a single value
describing the distance between the device and the target object in meters (m).
– SensorManager.SENSOR_TEMPERATURE Is a thermometer sensor that returns the
ambient temperature in degrees Celsius (°C).