快上网专注成都网站设计 成都网站制作 成都网站建设
成都网站建设公司服务热线:028-86922220

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

AndrdoidSensorsOverview(探测器概述)二

Introduction to Sensors

介绍传感器

让客户满意是我们工作的目标,不断超越客户的期望值来自于我们对这个行业的热爱。我们立志把好的技术通过有效、简单的方式提供给客户,将通过不懈努力成为客户在信息化领域值得信任、有价值的长期合作伙伴,公司提供的服务项目有:域名注册虚拟主机、营销软件、网站建设、沂南网站维护、网站推广。


The Android sensor framework lets you access many types of sensors. Some of these sensors

are hardware-based and some are software-based. Hardware-based sensors are physical components built into a handset or tablet device. They derive their data by directly measuring specific environmental properties, such as acceleration, geomagnetic field strength, or angular change. Software-based sensors are not physical devices, although they mimic hardware-based sensors. Software-based sensors derive their data from one or more of the hardware-based sensors and are sometimes called virtual sensors or synthetic sensors. The linear acceleration sensor and the gravity sensor are examples of software-based sensors.

Android sensor framework 让你使用多种传感器。有基于硬件和基于软件的。基于硬件的传感器是内置于设备中的物理组件。它们直接测量具体的环境属性来得出数据,例如加速度,地磁场强度,或者角的变化。基于软件的传感器你不是物理设备,尽管它们模拟硬件传感器。软件探测器通过一个或者多个硬件传感器来得出数据,有时称为虚拟传感器或者合成传感器。线性加速度传感器和重力传感器是软件传感器的例子。

Table 1 summarizes the sensors that are supported by the Android platform.

表1 总结了android 平台支持的传感器。

Few Android-powered devices have every type of sensor. For example, most handset devices and tablets have an accelerometer and a magnetometer, but fewer devices have barometers or thermometers. Also, a device can have more than one sensor of a given type. For example, a device can have two gravity sensors, each one having a different range.

少有android 设备每种传感器都有。例如,大部分手机设备和平板有一个加速计和一个磁力计,但是较少设备有气压计或温度计。一个设备也可以有一个以上的同类传感器,如果可以用两个不同范围的重力传感器。

Table 1.Sensor types supported by the Android platform.

表1。Android 平台支持的传感器种类。

SensorTypeDescriptionCommon Uses
TYPE_ACCELEROMETERHardware

Measures the acceleration force inm/s2 that is applied to a device on all three physical axes (x, y, and z), including the force of gravity.

测量在设备的三个轴的加速度,单位 m/s2 ,包括重力加速度

Motion detection (shake, tilt, etc.).

运动检测

TYPE_AMBIENT_TEMPERATUREHardware

Measures the ambient room temperature in degrees Celsius (°C). See note below.

测量室温,单位摄氏度(°C)

Monitoring air temperatures.

监视空气温度

TYPE_GRAVITYSoftware or Hardware

Measures the force of gravity in m/s2 that is applied to a device on all three physical axes (x, y, z).

测量在设备三个轴的重力加速度,单位m/s2

Motion detection (shake, tilt, etc.).
TYPE_GYROSCOPEHardware

Measures a device's rate of rotation in rad/s around each of the three physical axes (x, y, and z).

测量在设备三个轴上的角速度。单位rad/s

Rotation detection (spin, turn, etc.).

旋转检测

TYPE_LIGHTHardware

Measures the ambient light level (illumination) in lx.

测试环境亮度级,单位 lx

Controlling screen brightness.

控制屏幕亮度

TYPE_LINEAR_ACCELERATIONSoftware or Hardware

Measures the acceleration force in m/s2 that is applied to a device

on all three physical axes (x, y, and z), excluding the force of gravity.

测量在设备三轴上的加速度,排除了重力。

Monitoring acceleration along a single axis.

检测一个轴上的加速度

TYPE_MAGNETIC_FIELDHardware

Measures the ambient geomagnetic field for all three physical axes (x, y, z) in μT.

测量三轴的地磁场,单位μT

Creating a compass.

创建一个罗盘

TYPE_ORIENTATIONSoftware

Measures degrees of rotation that a device makes around all three physical axes (x, y, z).As of API level 3 you can obtain the inclination matrix and rotation matrix for  a device by using the gravity sensor and the geomagnetic field sensor in conjunction with the getRotationMatrix() method.

测量设备绕三轴转的旋转度。

Determining device position.
TYPE_PRESSUREHardwareMeasures the ambient air pressure in hPa or mbar.测量气压
Monitoring air pressure changes.
TYPE_PROXIMITYHardwareMeasures the proximity of an object in cm relative to the view screen of a device. This sensor is typically used to determine whether a handset is being held up to a person's ear.Phone position during a call.
TYPE_RELATIVE_HUMIDITYHardwareMeasures the relative ambient humidity in percent (%).Monitoring dewpoint, absolute, and relative humidity.
TYPE_ROTATION_VECTORSoftware or HardwareMeasures the orientation of a device by providing the three elements of the device's      rotation vector.Motion detection and rotation detection.
TYPE_TEMPERATUREHardwareMeasures the temperature of the device in degrees Celsius (°C). This sensor implementation varies across devices and this sensor was replaced with the TYPE_AMBIENT_TEMPERATURE sensor in API Level 14Monitoring temperatures.

本文题目:AndrdoidSensorsOverview(探测器概述)二
标题链接:http://6mz.cn/article/pgocop.html

其他资讯