I know in Galaxy Samsung SIII it is possible to configure in settings an option to avoid the screen turns off when user is looking into the screen. I think the phone uses the ca
You can use device's front camera to detect user's face and hence check the presence of the user. The good thing is this can work on any android phone with the front camera.
Here is the library from GitHub that demonstrates how you can achieve it using Google Play Services' Vission APIs.