1. Under the Standby page, click "Application".
2. Click on "s Health".
3. Click "Next".
4. After reading the terms and conditions, select "I agree", and then click "Next".
5. Choose whether to log in to the Samsung account or skip it according to your needs. (Take "Skip" for example)
6. Enter your basic information (name, sex, birthday), click "Next".
7. Enter your height and weight and click "Next".
8. Set up your active
:
void onaccuracychanged (sensor sensor,int accuracy): callback when sensor accuracy is changed.
void Onsensorchanged (Sensorevent event): Callback when the sensor-induced value changes.
For the above two methods, the accuracy of the sensor is generally not
implemented by the developer:
void onaccuracychanged (sensor sensor,int accuracy): callback when sensor accuracy is changed.
void Onsensorchanged (Sensorevent event): Callback when the sensor-induced value changes.
For the above two methods, the accuracy of the s
example, a user is racing in a game or controlling a ball in the game ). In addition, the physical environment of the device is also reflected in the action of the device. For example, the user is driving normally, and the Android device is quietly lying in the seat next to it, although the device does not move, it will continue to vibrate as the car moves, and the device will also move as the car moves.In the first case, You can monitor the relative
Android --- 57 --- sensor, android Sensor
The Android system provides support for sensors.Developing an application sensor is simple. You only need to register a listener for the specified listener.
Steps:1. Call the getSystemServ
)
Proximity sensor)
Light sensor)
Pressure sensor)
Temperature sensor)
Gravity sensor (introduced in Android 2.3)
Linear acceleration sensor (introduced in
Android open-source project Sensors
The android open-source project (aosp) provides three software-based mobile sensors: gravity sensor, linear acceleration sensor, and rotation vector sensor. These three sensors are updated in android4.0 and both use Gyroscope (except for o
This example describes Android's ability to create an Android dynamometer using the sensor sensor to refresh the UI in a thread. Share to everyone for your reference, specific as follows:
In the previous article, "Android based on sensor sensors to obtain gravitational indu
device's or application's frame of reference. In the second scenario, you need to monitor the movement of devices relative to the global frame.
Generally, Mobile sensors are not used to monitor device locations, but they can be used with other sensors, for example, use a Geomagnetic sensor to determine the location of a device relative to a global reference system (for more information, see location sensor
driving the car ). In the first scenario, you need to monitor the movement of devices relative to the device's or application's frame of reference. In the second scenario, you need to monitor the movement of devices relative to the global frame.
Generally, Mobile sensors are not used to monitor device locations, but they can be used with other sensors, for example, use a Geomagnetic sensor to determine the location of a device relative to a global re
are as follows:
Copy Code code as follows:
Sensor_delay_game This value is recommended if you are using a sensor to develop games. Most real-time rows are higher in the game using this level.
Sensor_delay_normal the default speed of obtaining sensor data. Standard delay, for the general puzzle game or easy to use the game can be used, but the low sampling
1. Under the Standby page, click "Application".
2. Click on "S Health".
3. Slide up the screen and click "Add".
4. Click "Measurement" under "heart rate".
5. Place your finger on the sensor on the back of the device.
6. The measurement results will be displayed after the measurement is completed. You can also select th
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
, "onaccuracychanged");
}
}; public void OnPause () {* * * is a critical part: Note that the documentation mentions that the sensor will continue to work even when the activity is not visible, and that the test can be found to be very high without a normal refresh rate, so be sure to
Turn off triggers in the OnPause method, otherwise it is not responsible for consuming a lot of user power.
* *
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 re
Sensor
TheSensorTo register.
SamplingPeriodUs
The ratesensor eventsAre delivered at. This is only a hint to the system. Events may be stored ed faster or slower than the specified rate. Usually events are stored ed faster. The value must be oneSENSOR_DELAY_NORMAL,SENSOR_DELAY_UI,SENSOR_DELAY_GAME, OrSENSOR_DELAY_FASTESTOr, the desired delay between events in microseconds. Specifying
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
. type_proximiy:
Proximity sensor
Sensor. type_temperature:
Temperature Sensor
Some mobile phones do not support some sensor devices. You can determine whether the sensor is null. If it is null, You can prompt the user.
You can also use the following statement to obtain a
1. 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 essential for mobile devices that focus on user experience. A
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.