How to make your phone lock and unlock itself automatically when you take it out of your pocket
1. Install Pocket Lock from the Google Play Store. It's a small, free download. Open it, tap the lock icon, then tap "Activate" to let the app access your screenlock controls.
2. Tap the wrench icon to take a look at the app's settings menu for any options you might want to adjust prior to activating it. For example, choose a preferred locking method, specify excluded application which will prevent the phone from unlocking when they are in use, or set a delay. You can also disable the app when using the device in landscape mode, or calibrate the motion sensor's angles to your liking. Once you're all set up, simply activate the app, and it should work as advertised. It mostly did for use!
3. Now, here's a pretty important part. If you want to get Pocket Lock out of your device for some reason, don't reach for Android's app uninstall menu. Instead, you'll have to tap the three-button menu, then hit Uninstall. That's how the app will disappear without a trace. Or if you don't want to uninstall, and happen to like how the app works, consider paying $0.99 for the Pro version. You will support the app developer's college tuition and unlock an unlimited number of exclusive apps!