资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

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.

另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


网页名称:AndrdoidSensorsOverview(探测器概述)二-创新互联
分享URL:http://cdkjz.cn/article/cejsho.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220