I want phone to sleep when user use my app. When user looks the screen it should be wake up. I tried to use proximity sensor but user must approach very close. Is there another way?
Asked
Active
Viewed 845 times
1 Answers
1
You could look at the phone movement, i.e. if the phones orientation is altered. See here for more info Detecting movement using accelerometer - (Orientation is not changing)?
-
1I don't want use phone movement. I want to detect user look the screen – user Apr 19 '16 at 08:24
-
What about motion detection using the camera? https://github.com/phishman3579/android-motion-detection – cultrixx Apr 19 '16 at 08:29