Dev:AppleProxShim

AppleProxShim is the IOHIDService that controls the device's proximity sensor. By default, this service is enabled only from within applications that have called the high-level method.

You can intercept the service to manually enable the proximity sensor and assign a callback action for the proximity events, even when on. To turn on the sensor, you need to change the service's default ReportInterval from 0 to a higher number. For more information about IOHID, see IOHIDFamily

Example
This example works only for the iPhone 4.

Note
The lockscreen has its own Dim Timer, so when in lockscreen the SBDimScreen event will only dim it, but will not undim. Test in, unlocked, for better results.