Possible Duplicate:
android: turn off screen when close to face
how can i detect that my face is close to the mobile , for example :- when i have answered to incoming call , the screen of the mobile turned-off , and when i move the device away , the screen is turned on again ,,how can we code this
Best Regards