Android-enabled devices have built-in Sensors which contains Orientation, Motion and other conditions.
These sensors provide data with high accuracy, which will assist to monitor the positioning and movement of the device. Some of the sensors are hardware based and few are software based.
There are three categories of sensors as mentioned below:
– Motion Sensors: These sensors regulate the rotational & acceleration forces and it includes gravity sensors, rotational vector sensor, accelerometers, etc.
– Environmental Sensors: It measures air temperature, pressure, humidity, etc.
– Position Sensors: It measures the physical position of the device and includes orientation sensors and magnetometers.
There are four types of Java Classes to define the activity of a sensor as shown below:
-Sensor Manager
-Sensor
-SensorEvent
-SensorEventListener
Regards,
Nitesh Bavishiya