Proximity sensor automatically darkens screen


#1

In attempting to complete the challenge, I have this problem: turning on proximity monitoring automatically causes the screen to darken when the proximity sensor is activated. That is, just this line of code alone …,

[device setProximityMonitoringEnabled:YES];

causes the screen to darken when you put a finger over the sensor. Having completed the challenge, I can still see the background color of the view being set to dark grey for a split second before the screen is darkened. However, I haven’t found a way to stop the automatic screen darkening. Anyone else have any luck?

iOS 4.3.5


#2

I think that is the correct behaviour.

My understanding (such as it is) of the challenge is that it’s there to provide practice with doing the steps necessary to receive notifications. I do not know of the actual utility of this particular notification other than for VoIP-type apps.