When making a phone call, the Android phone uses the proximity sensor to switch off the display when the phone is next to the ear. I would like to introduce the same behaviour to my app. Does anyone know whats the best way to do that? I know how to handle the proximity sensor, but I'm looking for a good way to blank the screen. I have tried to switch it off, reduce the display sleep time etc. but I found nothing that did behave like the behaviour in the Phone app.
Any ideas? Many thanks!