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
The android accelerometer is of the sensor. type_accelerometer type.
Return the value of the accelerometer through Android. Hardware. sensorevent.
The Unit returned by the accelerometer is the unit of acceleration m/s ^ 2 (meter per second). The values in three directions are
Values [0]: X-axis Acceleration
Values [1]: acceleration in Y-axis direction
Values [
.sensor.type_light: Light sensorValues[0]: Ambient light level lux unit value. 5.sensor.type_pressure: Pressure sensorValues[0]: Atmospheric pressure value, unit kpa. 6.sensor.type_proximity: Proximity sensorValues[0]: The distance value in centimeters. 7.sensor.type_relative_humidity: Humidity SensorValues[0]: percentage of ambient air relative humidity. 8.sensor.type_temperature: temperature sensorVALUES[
interface. This interface can monitor various events on the sensor. The Sensoreventlistener interface code is as follows:
Copy Code code as follows:
Public interface Sensoreventlistener {
public void Onsensorchanged (Sensorevent event) {
}
public void onaccuracychanged (Sensor Sensor, int accuracy) {
}
}
This article translated from: http://developer.android.com/guide/topics/sensors/sensors_overview.html
Most Android devices have built-in sensors for measuring motion, direction, and various environmental conditions. These sensors provide raw data with high precision and accuracy that can be used to monitor the movement and position of a device in three dimensions, or to monitor changes in the environment around the device. For example, a game may hav
Sensor Introduction
The android sensor framework allows you to access multiple types of sensors. Some sensors are hardware-based and some are software-based. Hardware-based sensors are physical components built in with handheld or flat devices. They obtain data by directly measuring specific environmental properties, such as acceleration, magnetic intensity, or a
Good evening ~ Today, I will continue to share with you the second important sensor. In fact, it is very easy to get the direction.ArticleA type_orientation keyword indicates that the device's moving direction can be directly obtained. However, the latest SDK adds the phrase "type_orientation this constant is deprecated. use sensormanager. getorientation () instead. that is to say, this method has been canceled and developers need to use sensormanager
Good evening ~ Today, I will continue to share with you the second important sensor. In fact, it is very easy to get the direction. In the first article, we will see a TYPE_ORIENTATION keyword, indicating that we can directly get the device's direction of movement, however, the latest SDK adds the following sentence: "TYPE_ORIENTATION This constant is deprecated. use SensorManager. getOrientation () instead. that is to say, this method has been cancel
As an input device of the Android system, sensor is essential for Android devices. Sensor mainly reports G-sensor, lightssensor, proximitysensor, and temperaturesensor. The porting of each sensor is similar. This article describes
Once upon a time, I wrote an article on Android sensor "stunning entire basketball court "... in a twinkling of an eye, two years have passed. It's really a thing that's gone, and the technology is updated fast. Now it's 4.0 chocolate ice cream...
0. Overview
This article hopes to understand the sensor system from the dynamic perspective (application process) and
Android sensor (details 2)-common Sensors
Direction sensor Orientation (now almost no longer needed, because there is actually no real direction) Magnetic Field Sensor Magnetic Field Temperature sensor Temperature Light pressure sensor
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
Environmental sensorsThe Android platform provides 4 sensors to detect different external environments. We can use these sensors to detect the surrounding. For example, the humidity, light, air pressure and temperature of the surrounding air can be detected. These 4 sensors are hardware-based sensors. In addition to the light sensor, 3 other sensors are rare in c
This article describes the Android approach to obtaining gravitational induction acceleration based on sensor sensors. Share to everyone for your reference, specific as follows:
FETC Project Guidance teacher put forward new requirements, want to show in the game map user users in the direction of the period of movement, and then using GPS is obviously very unreliable, so think of the
Gesture operation can be said to be a smart phone charm, the first two sections to explain the two interesting gestures, put them in the game, greatly enhance the game's playful and interesting. This section will continue to introduce another magical thing about smartphones: sensors.
first, what is the sensor
The so-called sensor is to be able to detect such as light, heat, temperature, gravity, direction
The above has already introduced the porting process of android temperature sensor. The code page has been posted to everyone. Now we can write an APK for testing. The code is very simple, and the interface is very simple and ugly. Haha, don't mind. This aok is only used for testing. I will not introduce it more here and paste the Code directly.Package com. android
From: http://blog.csdn.net/mr_raptor/article/details/80904741. Concept of Sensor
Sensor, a sensor, is a large number of existing smart phones, such as G-sensor, lightssensor, proximitysensor, and temperaturesensor. It is used as an input device of the Android system, it is e
Ability to identify sensors and sensors
The android sensor framework provides several methods that allow you to easily determine the sensors on the device during running. The API also provides several methods for you to determine the capabilities of each sensor, such as the maximum range, recognition rate, and power requirement.
To identify sensors on a device, y
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.