[APP][4.0+] Pocket Lock - Dump your power button! Automates locking and unlocking

Search This thread

PaeP3nguin

Senior Member
Apr 12, 2013
73
49

jULlhrSKlWoPCEmLbtlmqHXVRakI2-4NQPg5hVyXWbjTXYrt-Ac4hnwU9HTNS9tM25Vn=w300-rw

Pocket Lock

Dump your power button! Pocket Lock automates locking and unlocking for you.
Download Pocket Lock on the Play Store

Featured on Lifehacker! - "Pocket Lock actually works exactly as advertised, with no fuss, and that's what makes it such a cool app to have."

Pocket Lock intelligently locks and unlocks your phone for you. Choose from three different locking modes: proximity sensor only, gravity sensor only, and a fusion of both sensors. Just drop your phone in your pocket and it locks. Take it out and it unlocks. Pocket Lock is great for phones with broken power buttons or flip cases.

Pocket Lock is easy to set-up and forget, since it starts automatically on boot, but it also offers advanced customization options. The app is completely free and has no ads. If you have any questions, comments, or concerns, use the Send feedback option in the app to email me directly.

Screenshots:

fVbcIl8c4dwLcd7qEfxlS82CvSFPLWa-ffVX7ZUk3LNXJH6z2sta7LSepxx_hJH_XWA=h310-rw
eVOW1QnnKX-EfZrH7GzafLI20rnJjA2v5_DqbZ8o7x3eA5bQgK4zasg8iR9FPtC4rxGy=h310-rw
sNtOuqYs9D2oCVCqxoV5vuWHEyP23c3pRaVGlwqAeI7FP6tDBix3Dme85wcxBlToeSE=h310-rw

Kw53XMo5baeXDBKiS3UI8N1QRgoJTR6iUlhkHMev4YYvVD3A3SeCyLLTTPfOePTnXA=h310-rw

[IMGhttps://lh6.ggpht.com/rE9Bms28mQjg8CeZVcBaS3YvBtWNWzuPAUnDxQh1oi_moV6T4LLfvxq7l_E8tQStFQ=h900-rw[/IMG]
sl_NXoHYhe4O4teaYOmpxJOCrzTEmqFAcGsMCYopvgj_OmzYM3ueEaw6pRJ9uRVbRsI=h900-rw


Features:
* Intelligently locks your phone using the proximity and gravity sensor
* Works out of the box
* Intuitive options allow for easy customization
* Keeps your phone off when in your pocket. No more pocket pictures!
* Exclude applications
* Option to only lock or unlock your phone, great for Moto X Active Display
* Disable during phone calls
* Disable when screen is rotated

Notes:
Put your phone in your pocket upside down and with screen facing you for best results.
To uninstall, use the uninstall option in the app menu.

XDA:DevDB Information
Pocket Lock, App for all devices (see above for details)

Contributors
PaeP3nguin

Version Information
Status: Stable
Current Stable Version: 2.4.8
Stable Release Date: 2017-08-20

Created 2014-08-29
Last Updated 2017-08-20
 

Attachments

  • UpsideDown.png
    UpsideDown.png
    137.5 KB · Views: 3,485
  • WaveHand.png
    WaveHand.png
    90.1 KB · Views: 3,479
Last edited:

PaeP3nguin

Senior Member
Apr 12, 2013
73
49
Reserved

FAQs:
Help, my phone keeps locking and I can't use it!
First, try turning your phone upside down and unlocking it. If that works, then you have an issue with your gravity sensor. If that doesn't work, them you have may an issue with your proximity sensor. Restart the phone and quickly open Pocket Lock and change the locking method to "Do not lock", then let me know!

How do I uninstall Pocket Lock?
Use the uninstall option in the Pocket Lock menu.

Why does my phone turn off when I'm using it?
This is likely because the proximity sensor is accidentally getting covered. Try setting the lock delay higher and be careful to avoid the proximity sensor with your fingers. If this still does not work, just change the lock method to not use the proximity sensor at all, which should eliminate the problem entirely.

Why doesn't Pocket Lock unlock my phone?
The Android operating system will slow down the rate of sensor events or even stop sensors when the screen is off in order to save power. While this is great for your battery life, this means that if your phone has been off for a while, Pocket Lock may not wake it up immediately. I have noticed that the proximity sensor seems less prone to this problem than the other sensors, so try covering and then uncovering the proximity sensor.

Why does Pocket Lock use so much battery?
Pocket Lock has to keep your phone's sensors on in order to lock and unlock the screen. Some sensor use more power than others, which will in turn use more battery. Check the Diagnostics page and look at the value for Proximity sensor power usage and Gravity sensor power usage. Change your lock method to only use whichever sensor has the lower value. Consider trying the accelerometer to save battery.

Why does my phone turn off in the dark?
That's your phone manufacturer cheaping out by not using a quality proximity sensor! I would suggest changing your lock method to not use the proximity sensor.

Excluded applications doesn't work!
Recent versions of Android broke the original way Pocket Lock detected what application was running. Please try out excluding at least one app before buying pro :) If you've bought pro and excluded apps doesn't work, forward your order confirmation to [email protected] and I'll refund you.

What if I only want Pocket Lock to lock/unlock my phone?
In the lock method setting, you can change the locking sensor or unlocking sensor to "Do not lock" or "Do not unlock"

What apps are Pocket Lock incompatible with?
Pocket Lock may not play well with apps like No Lock, SkipLock, custom lock screens, or anything that messes with the lock screen or how the phone locks. Pocket Lock should not cause problems for other apps, though, because it's nice :)

How can I make Pocket Lock work with delayed lock/smart lock/custom lock screens?
Enable the "Alternate screen off method" setting. Note that the screen may now take a few seconds to turn off.

Why does Pocket Lock need the permission "Device ID & call information: read phone status and identity"?
This is so that Pocket Lock can detect when you're in a call and not lock your phone.

Why does Pocket Lock need the permission to modify system settings?
This is only used if you use the Alternate screen off method. Instead of force-locking your screen, Pocket Lock simply changes your screen timeout to zero, then back to your original setting after locking.
 
Last edited:

PaeP3nguin

Senior Member
Apr 12, 2013
73
49
Reserved

Privacy policy:
Pocket Lock does not store or transmit any of your data. Pocket Lock doesn't even access the internet. Pocket Lock only records one statistic: the number of times it has locked or unlocked your phone. The only way this is used is to display to you in the app.

Upcoming features:
  • Battery analysis: helps you customize settings to use the least amount of battery

Beta downloads:
  • None at the moment
 
Last edited:
  • Like
Reactions: Gborg3 and SVR

ahrion

Retired Forum Moderator / Recognized Developer
Jul 19, 2013
3,101
5,125
Add an Active Screen based element. IE enable unlock method on notifications for a set amount of time. Also Pocket Mode (notifications turn screen on unless in the pocket). User could configure ongoing and low priority?

Last but not least: Blacklist
 

PaeP3nguin

Senior Member
Apr 12, 2013
73
49
Add an Active Screen based element. IE enable unlock method on notifications for a set amount of time. Also Pocket Mode (notifications turn screen on unless in the pocket). User could configure ongoing and low priority?

Last but not least: Blacklist

Thanks for the suggestions! The blacklist is definitely on the to do list, though I want to make sure the basic functionality works well before starting on that. Pocket Mode is something I hadn't thought of that I'll have to look into. Right now, the app will relock the screen if a notification turns it on, though. Active screen is a cool idea, but I'm not sure if Pocket Lock's purpose warrants adding something like that. I believe there are already pretty good apps for that and Pocket Lock plays well with them. You can set Pocket Lock to just lock the screen and then those apps can unlock when they need to.
 
  • Like
Reactions: Gborg3

PaeP3nguin

Senior Member
Apr 12, 2013
73
49
This app sleeps and wakes display fine. However on every wake I must enter my pattern to unlock it. Is this by design?

Right now, that is how it works, yes. Eventually I will add some sort of delayed lock, like Android has naively, but for now, this most closely stimulates pushing the power button. If I just turn off the screen instead of locking the screen, Android may not enter a low power state. Thanks for using Pocket Lock!
 

PaeP3nguin

Senior Member
Apr 12, 2013
73
49
Does this cause wakelocks to keep the screen active? How bad is it for battery life?

Pocket Lock does not use any wakelocks when the screen is on and only very briefly uses a wake lock when unlocking the screen (probably under 100ms). The biggest concern in terms of battery life is how much power your phone's sensors use. Generally, proximity sensor use less power, so if you're worried about power usage, change your lock method to only use the proximity sensor.

You can also check how many milliamps your sensors use on the Diagnostics page in the app.
 
  • Like
Reactions: 12gage

kalans

Senior Member
May 28, 2014
214
59
Working great mate, I will be running it to see how well it works for my uses. Previously I lost my power button on my s3, since then I have been using a gestures to lock. With the home button being my goto button, well I would hate to lose it!

Hopefully this will be battery friendly and efficient for my uses. Thanks mate!

Sent from my SAMSUNG-SM-G900A using XDA Free mobile app
 

PaeP3nguin

Senior Member
Apr 12, 2013
73
49
Working great mate, I will be running it to see how well it works for my uses. Previously I lost my power button on my s3, since then I have been using a gestures to lock. With the home button being my goto button, well I would hate to lose it!

Hopefully this will be battery friendly and efficient for my uses. Thanks mate!

Sent from my SAMSUNG-SM-G900A using XDA Free mobile app

Hey, great to hear! If you go to the Diagnostics page in the app and tell me the values for Proximity sensor power usage and Gravity sensor power usage, I can give you an estimate of how much power the app uses and what combination of sensors will use the least power.
 

PaeP3nguin

Senior Member
Apr 12, 2013
73
49
Just uploaded the latest update onto the Google Play Store! Let me know what features you'd like to see in the next update. Right now, I'm thinking I'll add the option to use the accelerometer instead of the gravity sensor (saves power), and the option to change the proximity sensor sampling rate.
 
  • Like
Reactions: adl

adl

Senior Member
Dec 18, 2010
1,785
1,076
I tried your app yesterday and while it locked the phone just as expected when I put it in my pocket it took very long (about 2 seconds) to turn on the screen when I took it out of the pocket. I changed the turn on time to very low value (20ms) but that didn't change anything. Will see what the new update brings and if that changes anything.
 

PaeP3nguin

Senior Member
Apr 12, 2013
73
49
I tried your app yesterday and while it locked the phone just as expected when I put it in my pocket it took very long (about 2 seconds) to turn on the screen when I took it out of the pocket. I changed the turn on time to very low value (20ms) but that didn't change anything. Will see what the new update brings and if that changes anything.

Hmm, that's rather strange. What phone are you using? It's possible that Android is slowing down the sensor events when the screen is off to save battery, so it might have taken a while to detect it was out of your pocket.
 

adl

Senior Member
Dec 18, 2010
1,785
1,076
Hmm, that's rather strange. What phone are you using? It's possible that Android is slowing down the sensor events when the screen is off to save battery, so it might have taken a while to detect it was out of your pocket.

It's a Nexus 5 running the Slimkat Custom ROM. Not sure if that's helping... :)
I am trying the all "gravity screen on" now and it's turning the screen on instantly, so sensors shouldn't be the problem.
 

PaeP3nguin

Senior Member
Apr 12, 2013
73
49
It's a Nexus 5 running the Slimkat Custom ROM. Not sure if that's helping... :)
I am trying the all "gravity screen on" now and it's turning the screen on instantly, so sensors shouldn't be the problem.

Hmm, strange. In the Pocket Lock settings, what is your lock method set to?
 

adl

Senior Member
Dec 18, 2010
1,785
1,076
Hmm, strange. In the Pocket Lock settings, what is your lock method set to?

I left it on standard, so both methods.
I didn't change any other setting, only the setting I mentioned above. Well try the new version as soon as I see it in playstore (shows old version so for).

EDIT:
New version seems to work better/faster. I still uninstalled it, as i found out that for my phone usage i am better off without an automatic on/off app. I usually have my phone in the backpocket and before i sit down i take it out but don´t want it to turn actually on or i carry the phone around in my hands.

Anyway good luck with the app!
 
Last edited:

PaeP3nguin

Senior Member
Apr 12, 2013
73
49
I left it on standard, so both methods.
I didn't change any other setting, only the setting I mentioned above. Well try the new version as soon as I see it in playstore (shows old version so for).

EDIT:
New version seems to work better/faster. I still uninstalled it, as i found out that for my phone usage i am better off without an automatic on/off app. I usually have my phone in the backpocket and before i sit down i take it out but don´t want it to turn actually on or i carry the phone around in my hands.

Anyway good luck with the app!

Good to hear the new version is working better. Hey, thanks for using Pocket Lock!
 

PaeP3nguin

Senior Member
Apr 12, 2013
73
49
New update just uploaded. I've sort of given up on the gravity sensor. Even though it's supposed to be more accurate, it tends to use way more power and seems to have problems on Samsung phones. The next update will default to using the accelerometer, though there is an easy checkbox to disable that change.

Could you guys let me know what the Gravity sensor power usage and the Accelerometer sensor power usage values in the Diagnostics screen show? I'm pretty sure that the accelerometer should universally use less power.
 

MadMax808

Member
Dec 26, 2010
5
0
Just downloaded this a few hours ago and it's been great. The app UI itself is nice, too!

I particularly like the vibrate/sound on lock and unlock. Any chance you'd let us pick our own sound in the future?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 22

    jULlhrSKlWoPCEmLbtlmqHXVRakI2-4NQPg5hVyXWbjTXYrt-Ac4hnwU9HTNS9tM25Vn=w300-rw

    Pocket Lock

    Dump your power button! Pocket Lock automates locking and unlocking for you.
    Download Pocket Lock on the Play Store

    Featured on Lifehacker! - "Pocket Lock actually works exactly as advertised, with no fuss, and that's what makes it such a cool app to have."

    Pocket Lock intelligently locks and unlocks your phone for you. Choose from three different locking modes: proximity sensor only, gravity sensor only, and a fusion of both sensors. Just drop your phone in your pocket and it locks. Take it out and it unlocks. Pocket Lock is great for phones with broken power buttons or flip cases.

    Pocket Lock is easy to set-up and forget, since it starts automatically on boot, but it also offers advanced customization options. The app is completely free and has no ads. If you have any questions, comments, or concerns, use the Send feedback option in the app to email me directly.

    Screenshots:

    fVbcIl8c4dwLcd7qEfxlS82CvSFPLWa-ffVX7ZUk3LNXJH6z2sta7LSepxx_hJH_XWA=h310-rw
    eVOW1QnnKX-EfZrH7GzafLI20rnJjA2v5_DqbZ8o7x3eA5bQgK4zasg8iR9FPtC4rxGy=h310-rw
    sNtOuqYs9D2oCVCqxoV5vuWHEyP23c3pRaVGlwqAeI7FP6tDBix3Dme85wcxBlToeSE=h310-rw

    Kw53XMo5baeXDBKiS3UI8N1QRgoJTR6iUlhkHMev4YYvVD3A3SeCyLLTTPfOePTnXA=h310-rw

    [IMGhttps://lh6.ggpht.com/rE9Bms28mQjg8CeZVcBaS3YvBtWNWzuPAUnDxQh1oi_moV6T4LLfvxq7l_E8tQStFQ=h900-rw[/IMG]
    sl_NXoHYhe4O4teaYOmpxJOCrzTEmqFAcGsMCYopvgj_OmzYM3ueEaw6pRJ9uRVbRsI=h900-rw


    Features:
    * Intelligently locks your phone using the proximity and gravity sensor
    * Works out of the box
    * Intuitive options allow for easy customization
    * Keeps your phone off when in your pocket. No more pocket pictures!
    * Exclude applications
    * Option to only lock or unlock your phone, great for Moto X Active Display
    * Disable during phone calls
    * Disable when screen is rotated

    Notes:
    Put your phone in your pocket upside down and with screen facing you for best results.
    To uninstall, use the uninstall option in the app menu.

    XDA:DevDB Information
    Pocket Lock, App for all devices (see above for details)

    Contributors
    PaeP3nguin

    Version Information
    Status: Stable
    Current Stable Version: 2.4.8
    Stable Release Date: 2017-08-20

    Created 2014-08-29
    Last Updated 2017-08-20
    5
    Hey guys, just wanted to give you guys an update on the development of Pocket Lock. I haven't had much time to work on Pocket Lock now that school has started, but thankfully, there are relatively few bugs now.

    The features I'm working on right now are a Performance Analysis feature, which would be a few quick questions on what you want Pocket Lock to do and then it'll show you a report on how much battery Pocket Lock will use and a list of suggestions on settings to change to improve battery life and performance.

    Another feature I'm working on is to shut off Pocket Lock when your phone reports that it's battery is low and turn it back on again once battery is no longer low.

    Finally, I'm working on a feature where if you wave your hand over the screen, the lock timeout will reset. So if your phone's screen is about to turn off due to inactivity, you can just wave your hand over the screen and it'll reset the timer before it turns off.

    Thanks for using Pocket Lock!
    4
    Reserved

    FAQs:
    Help, my phone keeps locking and I can't use it!
    First, try turning your phone upside down and unlocking it. If that works, then you have an issue with your gravity sensor. If that doesn't work, them you have may an issue with your proximity sensor. Restart the phone and quickly open Pocket Lock and change the locking method to "Do not lock", then let me know!

    How do I uninstall Pocket Lock?
    Use the uninstall option in the Pocket Lock menu.

    Why does my phone turn off when I'm using it?
    This is likely because the proximity sensor is accidentally getting covered. Try setting the lock delay higher and be careful to avoid the proximity sensor with your fingers. If this still does not work, just change the lock method to not use the proximity sensor at all, which should eliminate the problem entirely.

    Why doesn't Pocket Lock unlock my phone?
    The Android operating system will slow down the rate of sensor events or even stop sensors when the screen is off in order to save power. While this is great for your battery life, this means that if your phone has been off for a while, Pocket Lock may not wake it up immediately. I have noticed that the proximity sensor seems less prone to this problem than the other sensors, so try covering and then uncovering the proximity sensor.

    Why does Pocket Lock use so much battery?
    Pocket Lock has to keep your phone's sensors on in order to lock and unlock the screen. Some sensor use more power than others, which will in turn use more battery. Check the Diagnostics page and look at the value for Proximity sensor power usage and Gravity sensor power usage. Change your lock method to only use whichever sensor has the lower value. Consider trying the accelerometer to save battery.

    Why does my phone turn off in the dark?
    That's your phone manufacturer cheaping out by not using a quality proximity sensor! I would suggest changing your lock method to not use the proximity sensor.

    Excluded applications doesn't work!
    Recent versions of Android broke the original way Pocket Lock detected what application was running. Please try out excluding at least one app before buying pro :) If you've bought pro and excluded apps doesn't work, forward your order confirmation to [email protected] and I'll refund you.

    What if I only want Pocket Lock to lock/unlock my phone?
    In the lock method setting, you can change the locking sensor or unlocking sensor to "Do not lock" or "Do not unlock"

    What apps are Pocket Lock incompatible with?
    Pocket Lock may not play well with apps like No Lock, SkipLock, custom lock screens, or anything that messes with the lock screen or how the phone locks. Pocket Lock should not cause problems for other apps, though, because it's nice :)

    How can I make Pocket Lock work with delayed lock/smart lock/custom lock screens?
    Enable the "Alternate screen off method" setting. Note that the screen may now take a few seconds to turn off.

    Why does Pocket Lock need the permission "Device ID & call information: read phone status and identity"?
    This is so that Pocket Lock can detect when you're in a call and not lock your phone.

    Why does Pocket Lock need the permission to modify system settings?
    This is only used if you use the Alternate screen off method. Instead of force-locking your screen, Pocket Lock simply changes your screen timeout to zero, then back to your original setting after locking.
    3
    Man, oh man, I haven't updated in a while. New update is out in the Play Store! You should see it on your devices today.

    Features:
    * Added excluded apps fix, go to settings to enable
    * Added alternate lock method that should work with delayed lock, Smart Lock, etc.
    * Pro: setting to turn Pocket Lock off when battery is low
    * Material design for Lollipop, mmm
    * New wave to wake feature
    * Persistent notification better at keeping Pocket Lock running
    * Performance improvements

    Some of the delay is due to Sprint being really slow to release Lollipop to my phone so that I could test new features. Mostly, it's just a result of me being busy. Hopefully this update addresses a lot of issues that people have!
    3
    So, what's the reason to use this instead of Gravity Screen Pro?

    Hey, thanks for asking. Many reasons, I would say.

    First of all, Pocket Lock is simply easier to use than Gravity Screen. The user interface and preferences are all much easier to use and just look better.

    Secondly, Pocket Lock is more battery friendly than Gravity Screen. Pocket Lock doesn't abuse wakelocks like Gravity Screen, which prevents the phone from going into deep sleep and it uses the accelerometer, which on many phones uses 10 to 20 times less power than the gravity sensor, which Gravity Screen uses.

    Third, Pocket Lock has advanced features that Gravity Screen doesn't, such as letting you adjust the sensor sampling rate, disable the app in landscape mode, only lock or only unlock the screen using the sensor of your choice, etc.

    Fourth, Pocket Lock's pro version is half the price of Gravity Screen's (0.99 vs 1.97) and offers the same features.

    Finally, Pocket Lock is actively maintained and updated by me, the developer. Gravity screen hasn't been updated since July of this year, whereas Pocket Lock's last update was yesterday. I also answer all posts on this forum and emails to me promptly.

    I'd encourage you do download Pocket Lock and give it a try!