ios设备的红外感应,打电话的时候会自动黑屏的那个API:
[[UIDevice currentDevice] setProximityMonitoringEnabled:YES];
通知: [[NSNotificationCenter defaultCenter] addObserver:self selector:nil name:UIDeviceProximityStateDidChangeNotification object:nil];
设置屏幕不进入待机状态:
[[UIApplication sharedApplication] setIdleTimerDisabled:YES];