Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Proximity sensor disable my screen

I develop one app in that used the the Proximity Sensor. Detect properly the state change when move hand around proximity sensor. but display black screen when stop hand in front of proximity sensor. i don't want this black screen.

i tried this line of code.

UIApplication *thisApp = [UIApplication sharedApplication];
thisApp.idleTimerDisabled = YES;

but not work.

Thanks in Advance.

like image 990
Jitendra Avatar asked Nov 11 '22 20:11

Jitendra


1 Answers

Sadly there's no way to prevent the screen from blacking out when the proximity sensor is covered. Hopefully Apple will change this in the future.

like image 115
user2175889 Avatar answered Nov 15 '22 06:11

user2175889