- Android Sensor Programming By Example
- Varun Nagpal
- 276字
- 2021-07-16 11:08:08
Motion, position, and environmental sensors
The Android platform supports mainly three broad categories of sensors: the motion, position, and environment-based sensors. This categorization is done based on the type of physical quantity detected and measured by the sensors.
Motion sensors
Motion sensors are responsible for measuring any kind of force that could potentially create motion in the x, y, and z axes of the phone. The motion could be either a linear or angular movement in any direction. This category includes accelerometers, gravity, gyroscope, and rotational vector sensors. Most of these sensors will have values in the x, y, and z axes, and the rotational vector will especially have extra value in the fourth axis, which is the scalar component of the rotation vector.
The following table summarizes the motion sensor usage, types, and power consumption:

Position sensors
Position sensors are used to measure the physical position of the phone in the world's frame of reference. For example, you can use the geomagnetic field sensor in combination with the accelerometer to determine a device's position relative to the magnetic North Pole. You can use the orientation sensor to determine the device's position in your application's frame of reference. Position sensors also support values in the x,y, and z axes.
The following table summarizes the position sensor's usage, types, and power consumption:

Environmental sensors
Environment sensors are responsible for measuring environmental properties, such as temperature, relative humidity, light, and air pressure near the phone. Unlike motion and position sensors, which give sensor values multi-dimensional arrays, the environment sensors report single sensor values.
The following table summarizes the environment sensor's usage, types, and power consumption:

- Java逍遙游記
- Vue.js設計與實現
- Beginning C++ Game Programming
- Python for Secret Agents:Volume II
- C語言程序設計(第2版)
- PyTorch自然語言處理入門與實戰
- Xamarin.Forms Projects
- 自然語言處理Python進階
- Android程序設計基礎
- Learning Ionic
- Appcelerator Titanium:Patterns and Best Practices
- Microsoft Exchange Server 2016 PowerShell Cookbook(Fourth Edition)
- Android熱門應用開發詳解
- 輕松學Scratch 3.0 少兒編程(全彩)
- 軟件自動化測試實戰解析:基于Python3編程語言