Sensors in smartphone

上一篇 / 下一篇  2014-03-24 13:46:21 / 个人分类:mobile testing

Different devices have different combinations of sensors, we will look at some of the popular ones.

** Touch sensors

Touch sensors are built-in, and are part of the physical device. They are part if the touchscreen input, and sense either pressure or electrical capacitance when a person interacts with them. The resulting interaction is sent to a controller, which is then processed by the device. Developers usually have access through these indirectly, such as through gesture APIs so they can create their own special inputs.

触摸传感器是内置的,是物理设备的一部分。如果触摸屏输入,感觉压力或电电容当一个人与他们交互。由此产生的交互是发送到控制器,然后被处理。开发人员通常通过这些间接访问,比如通过手势api,这样他们就可以创建他们自己的特殊的输入。

What can go wrong with it???
One of the biggest problems with touch screens are apps that are not designed to handle inadvertant movement. We use devices on the move, and is an app is activated while the device is jostling in a pocket, bag or purse, what can happen? This is the dreaded "pocket dial" scenario.

** Accelerometer & Gyroscope 加速度计和陀螺仪

There are sensors that detect movement, and are used in applications. Most devices have accelerometers, whild more high end devices will also have a gyroscope.

> Accelerometer: a sensor that detects a change in movement. It is also used to orient devices by measuring gravity.
> Gyroscope: a sensor that detects 360 motion. It measures rotation by factoring in things like yaw, pitch and roll.

How they are used?
> To determine app orientation: portrait or landscape display
> For stabilization of the display of images, video
> Detect movement for app interaction(tilt, rotate, shake, etc.)
> To help determine location, and pinpoint direction of movement, where the device is pointed, etc. to help provide more accurate information.

What can go wrong with???
> App orientation problems
> Rapid switching from portrait to landscape with slight or no movement can cause an app to freeze up or go into an error state
> The device freezes if too many activities are being processed at once
> Sensor overload when there is too much inadvertant movement causing incorrect information to be used

** Magnetometer 磁强计
This is a sensor that measures the strength of magnetic fields. It can be used to determine direction.

What can go wrong with it???
You can get interference just like you can with a regular analog compass: from steel, other magnets, or have trouble finding a point due to too much movement. 




TAG:

 

评分:0

我来说两句

Open Toolbar