Sensors in Android





What is a sensor - 

A sensor is a device which detects and measures changes in its environment.
Sensors measure various environmental parameters such as light, motion, temperature, pressure, humidity, magnetic field.

Available sensors on Android -

  1. Fingerprint Scanner
  2. Iris scanner
  3. Accelerometer
  4. Gyroscope sensor
  5. Magnetic sensor
  6. Gravity sensor
  7. Rotation sensor
  8. Proximity sensor
  9. Hall effect sensor
  10. Light sensor
  11. Temperature sensor
  12. Pressure sensor
  13. Humidity sensor
  14. Step detector
You can test most of these sensors in this app if they are available on device.

  • Fingerprint sensor -

 A fingerprint sensor is an electronic device which captures pattern of fingerprint, It usually matches captured pattern with pre-stored pattern for authentication.
  There are many technologies used for fingerprint sensor including optical, capacitive, ultrasonic. but optical and capacitive types are most commonly used.

 Capacitive type -


 Capacitance sensors use principles associated with capacitance in order to form fingerprint images. In this method of imaging, the sensor array pixels each act as one plate of a parallel-plate capacitor, the dermal layer (which is electrically conductive) acts as the other plate, and the non-conductive epidermal layer acts as a dielectric.  It is most commonly used in modern smartphones as it is fast and compact.

Optical type - 



Optical fingerprint imaging involves capturing a digital image of the print using visible light. This type of sensor is, in essence, a specialised type of digital camera. The top layer of the sensor, where the finger is placed, is known as the touch surface. Beneath this layer is a light-emitting phosphor layer which illuminates the surface of the finger. The light reflected from the finger passes through the phosphor layer to an array of solid state pixels (a charge-coupled device) which captures a visual image of the fingerprint




  • Iris Scanner -



 Iris recognition is an automated method of biometric identification that uses mathematical pattern-recognition techniques on video images of one or both of the irises of an individual's eyes, whose complex patterns are unique, stable, and can be seen from some distance.Currently only High end smartphones have Iris scanners.

  • SpO2 Sensor -



Pulse oximetry is a noninvasive method for monitoring a person's oxygen saturation (SO2).  The blood oxygen saturation or SpO2 level shows the amount of oxygen in the blood. SpO is an estimate of arterial oxygen saturation, which refers to the amount of oxygenated hemoglobin in the blood.

Reading your SpO level works the same as reading your heart rate. 

  • Heart rate sensor -

SpO2 and Heart rate sensors are same sensor. Heart rate sensor measures heart rate in beats per minute using an optical LED light and a light sensor. The light goes through skin and sensor measures amount of light reflects back which changes according to blood pluses under skin. The change in light reflection are interpreted as heartbeats.

  • Accelerometer -


 Accelerometer is an electromechanical device which measures acceleration i.e. change in velocity. Android devices have 3-axis  accelerometer which detects acceleration in X, Y, Z axis. Z axis is perpendicular to the Earth surface so in ideal condition when we keep device flat on surface, Z axis will give value 9.7 m/s2 , which is acceleration due to gravity.
 It is used to detect device screen orientation and for steps counter.


  • Gyroscope sensor

Gyroscope is a device which is used for measuring Orientation and angular velocity. In Android 3-axis Gyroscope measures rate of rotation in rad/s around devices X, Y, Z axis. It used to detect devices orientation and play games.

  • Magnetic sensor

 It is an electromechanical device which detects and measure magnetic field. I tis measured in Tesla(T). It is used for digital compass.

  • Gravity sensor

The gravity sensor measures the acceleration effect of Earth's gravity on the device enclosing the sensor. It is typically derived from the accelerometer, where other sensors (e.g. the magnetometer and the gyroscope) help to remove linear acceleration from the data. The Gravity unit are in m/s² like the accelerometer, and they are measured along the X,Y, and Z axes.

  • Rotation sensor

It is software based sensor which usages values from Accelerometer and Magnetometer to calculate values of the pitch, roll and yaw(azimuth) angles of smartphone relative to normal horizon. 

  • Proximity sensor

It is an electronic device which detects presence of object in its region. there are many types proximity sensors available but most smartphones use optical type. It emits beam of infrared light and sense the reflection in order to determine the objects proximity distance from the sensor. It is most commonly used to avoid accidental screen touches while on call.

  • Hall effect sensor

Hall effect sensor is a transducer that varies its output voltage in response to a magnetic field. In Android it is used to detect position of flip cover as flip cover contains a small magnet in it. This sensor is not detected by Android system and there is no official API for it.

  • Light sensor

It is a photodetector which converts light photons in to current. In Android it measures ambient light falling on device to adjust screen brightness accordingly. 

  • Temperatur sensor


It is a Thermistor which changes its electric resistance with respect to temperature. It measures ambient air temperature. There are many temperature sensors present in android to monitor CPU and Battery temperature in order to protect device from overheat but they are part of SOC system and their value is not meant to read by user. Only ambient temperature is available in Android API to use.

  • Pressure sensor

It is piezoelectric strain gauge which measures pressure of gases. Electric resistivity of sensor changes with pressure.  Pressure sensor in Android measures ambient air pressure

  • Step detector

It is  software based sensor which detects steps while walking or running. IT usages variation pattern in accelerometer to detects steps.