What do the proximity and orientation sensors in the iPhone do?

The proximity sensor in an iPhone senses how close the iPhone is to the user's cheek/face, so that it can pause whatever activity it is in the middle of (playing music or browsing the web, for example) so the user can take a phone call. When the iPhone is removed from the ear after the call, the iPhone resumes its previous activity.

---

The orientation sensor (accelerometer) works very much like the same sensor in a digital camera that gauges what orientation the unit is being held so that it can rotate the display for optimal viewing.

 

Here are a couple of real-world examples of the accelerometer at work:

 

  • You're looking at your photos on an iPhone - you can hold the iPhone vertically for portrait-oriented (taller than wide) photos, and horizontally for landscape-oriented (wider than tall) photos, and they will stretch to fill the screen.

 

  • You're browsing the web, and you come across a site that features a lot of text (a news site, for example). It all shows up when you hold the iPhone vertically, but you can't read it because the text is so small. Rotate the iPhone 90 degrees, and the page will adjust to fill the width of the longer dimension of the screen, making the text much more legible.


距离传感器用来感知手机和人体间的距离。常见的用途是检测手机和人的面部的距离,假设这样一种情景:你正在听歌或者浏览网页,这时候当你将手机贴近面部的时候距离传感器便会感知到从而暂停音乐播放或者暂停网页浏览。而当你将手机移开耳朵的时候距离传感器也会感知到这个情况,从而唤醒刚才被暂停的活动。

确切的说,重力传感器并并不是方位传感器。但是上面的英文貌似认为重力传感器和方位传感器是一样的(这也许是翻译的问题)。我认为方位传感器应该是指南针,但我目前还没有确认这个东西。
重力传感器在手机上是用于判断该手机当前的状态的,如:手机有六个面,我们可以把这六个面依次朝下放在桌子上,那么gSensor都可以感知到目前手机到底是怎么放置的!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

YasinLeeX

再来一杯西湖龙井。

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值