The Android platform provides several sensors that can monitor the movement of devices. Two of them are hardware-based (accelerometer and gyroscope). Three sensors can be hardware-based, it can also be software-based (Gravity Sensors, linear acceleration sensors, and rotating vector sensors ). For example, some software sensor-based devices extract their data from the accelerometer and the magnetic
This article translated from: http://developer.android.com/guide/topics/sensors/sensors_motion.html
The Android platform provides several sensors that can monitor the movement of devices. Two of them are hardware-based (accelerometer and gyroscope). Three sensors can be hardware-based, it can also be software-based (Gravity Sensors, linear acceleration sensors, and rotating vector sensors ). For example, some software
Android motion sensor
Android motion sensor
The Android platform supports some sensors used to monitor device movements (five such sensors ). Two of them are pure hardware sensors. The
Motion sensors are useful for monitoring the movement of devices, such as tilt, vibration, rotation, and swing, which are the monitoring ranges of motion sensors. The movement of a device is usually a direct response to user input.All motion sensors return a value of three floating-point numbers, and for different sensors, the three values have different meanings
Now there are all kinds of sensors in Android phones, such as accelerometers, gyroscopes and the like, I now use a total of nine sensors in the Vivo V3 phone:Lis3dh-accel : Tri-axis acceleration sensorTmd277x-proximity : Near distance sensorTmd277x-light : Light sensorYas533-orientation : Direction sensorYas533-pseudo-gyro : Motion sensorYas533-linear-acceleration : Linear acceleration SensorYas533-rotation
1. How does the android coordinate system define the x and y z axes?
The X axis direction is from left to right along the horizontal direction of the screen. If the mobile phone is not a square, the shorter side needs to be placed horizontally, and the longer side needs to be placed vertically.
The Y-axis direction is from the lower left corner of the screen along the vertical direction of the screen to t
Well, thanks to the recent development requirements for smart hardware, so the recent days to share the blog is roughly linked to intelligent hardware, like a piece of Bluetooth sharing, I believe that many readers have seen, then today I bring you the knowledge of the Android sensor introduction and use of methods, for the use of sensors , different versions of the And
Android Orientation Sensor (Direction Sensor) details and applications, androidorientation
I. Preface
This blog is my first article on "Android advanced". It has been around for more than four months since I started Android, and I have some experiences, I can also do som
TYPE_RELATIVE_HUMIDITY = 12;/*** get the constant of the temperature sensor: Disable public static final int TYPE_TEMPERATURE = 7; */public static final int TYPE_AMBIENT_TEMPERATURE = 13;
Interpretation of sensor event values in Android devices
The acceleration sensor, also known as G-
The sensor is a detection device that can feel the information being measured, and can transform the detected and sensed information into an electrical signal or other required form of information output according to a certain law.There are many sensors (physical devices) built into the Android operating system that can detect, perceive, and communicate the signals and physical conditions of the outside wor
. getsystemservice method by passing in the sensor_service parameter to obtain an instance of sensor. Always remember to close the sensor when you don't need it, especially when the activity is tentative. Ignoring this will consume the battery in a few hours. Note that when the screen is off, the system will not automatically turn off the sensor.
Three Common Se
In the recent project, to achieve the mobile operation of Android devices in six directions, the first thing that comes to mind is the direction sensor. However, due to the diversity of Android devices, in the testing process, not all devices have direction sensors. If there is no direction sensor, acceleration sensors
context. getsystemservice method by passing in the sensor_service parameter to obtain an instance of sensor. Always remember to close the sensor when you don't need it, especially when the activity is tentative. Ignoring this will consume the battery in a few hours. Note that when the screen is off, the system will not automatically turn off the sensor.
Three
() = =sensor.type_orientation) { - //gets the angle that the current sensor obtains $ floatdegree =-event.values[0]; $ //rotates from the last angle by the motion tween rotation angle -Rotateanimation RA =Newrotateanimation (startdegree, Degree, -Animation.relative_to_self, 0.5f, theAnimation.relative_to_self, 0.5f); -Ra.setduration (200);Wuyi iv_compass.star
Android acceleration Sensor G-sensor, androidg-Sensor
Sensor. TYPE_ACCELEROMETER
Values [0]: x-axis AccelerationValues [1]: acceleration in y-axis directionValues [2]: acceleration in the z-axis direction
The x, y, and z directions are defined as the coordinates of
Mobile phone sensor research, sensor researchZookeeper
How smart phone Accelerator works (explanation video ):
Http://jandan.net/2012/05/24/smartphone-accelerometer.html
[Android Note 5] Android
light intensity, the unit of light is lux, and its physical meaning is luminous flux on the unit area.The light sensor is mainly used for the LCD auto-brightness function of Android system.The brightness of the LCD can be adjusted in real time according to the light intensity sampled.1-6 Pressure sensorThe pressure sensor returns the current pressure in the unit
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.