Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone Proximity Sensor

Tags:

Can the iPhone SDK take advantage of the iPhone's proximity sensors? If so, why hasn't anyone taken advantage of them? I could picture a few decent uses.

For example, in a racing game, you could put your finger on the proximity sensor to go instead of taking up screen real-estate with your thumb. Of course though, if this was your only option, then iPod touch users wouldn't be able to use the application.

Does the proximity sensor tell how close you are, or just that something is in front of it?

like image 463
Greg Avatar asked Oct 03 '08 03:10

Greg


People also ask

Is there a proximity sensor on iPhone?

Proximity sensors used in iPhones are optical sensors. To give an example, I suppose you've noticed that whenever you answer a call and put it to your ear, the screen goes off. This is to prevent accidental touches while on calls. It also serves other purposes but is majorly used to disable the screen while on calls.

How do I turn on proximity sensor on iPhone?

You can turn off and on this (this is on by default) by going to Settings > Display & Brightness. Make sure that your iPhone's case or screen protector does not obstruct with the proximity sensor activity.

What does proximity sensor mean on iPhone?

Proximity sensor is a small component which can detect a short distance for around 10cm. In iPhone and iPad, this sensor is placed at the top of the screen. It is usually used for dimming the screen to preserve battery while user is answering a phone call.

How do I turn off Apple proximity sensor?

You can't actually turn off the proximity sensor on an iPhone, so your best option is to make sure it's working properly. Your iPhone's proximity sensor can tell when you're holding the phone up to your ear, and it will shut off the screen, saving battery and preventing your face from accidentally hitting buttons.


1 Answers

There is a public API for this. -[UIApplication setProximitySensingEnabled:(BOOL)] will turn the feature on. BTW, it doesn't seem to be using the light sensor, because proximity sensing would tweak out in a dark room.

However, the API call basically blanks the screen when you hold the phone up to your face. Not useful for interaction, sadly.

like image 196
Brendan Berg Avatar answered Nov 15 '22 11:11

Brendan Berg