Reputation: 11606
This is a long shot, but does anyone know a way to avoid the automatic screen blanking when using the proximity sensor (UIDevice.proximityMonitoringEnabled & proximityState)?
Upvotes: 5
Views: 983
Reputation: 301
You can use this trick to temporary disable screen turn off
UIDevice *device = [UIDevice currentDevice];
[device setProximityMonitoringEnabled:YES];
But current public API do not allow to use proximity sensor without blacking out the screen. Any one have solution for this?
Upvotes: 0
Reputation: 157
UIDevice only allows you to monitor the proximity sensor state and handle it within your app. You cannot control the blackening of the screen.
Upvotes: 1