It was unpublished from Google Play, because of this issue.
This Open Source app will ensure, that your screen is locked when in pocket or bag.
You will benefit:
- Screen won't eat your battery
- No more accidental calls
Will start automatically after device reboot (use app to start/stop it).
It uses proximity sensor to measure when device is in pocket. Screen is turned off when there is something close to the proximity sensor (in the front of the screen).
Measurement is done right after screen is unlocked. After few seconds you can cover sensor with your hand. No more annoying screen locking.
If screen is covered and power button is pressed, the screen will flash short and it will turn off screen - saves your battery.
To test if it works you need to lock your phone, cover the Proximity sensor (top corner usually) and then try to turn on the screen again. It should turn off soon and vibrate (so you know it works).
This app REQUIRES your ADMIN rights on the phone to lock the screen. It's the way Android architecture is created. And it's good, because you always know when this app is enabled to lock the screen and when it's not. NOTE, that you need to remove this app from admins before you can uninstall it. Please go here to do so: Settings->Security->Device administrators
Sources are here: https://github.com/ViliusKraujutis/Proximity-Screen-Locker
Google Play: https://play.google.com/store/apps/details?id=lt.kraujutis.vilius.android.screenlocker