yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] PaeP3nguin:
Good to hear the accelerometer is working fine. If your lock method was set to only use the proximity sensor, the update shouldn't have changed that.

It's likely a combination of hardware and software. Different sensors would certainly use differing amounts of battery. The gravity sensor, however is not always an actual hardware sensor, but can be a combination of data from multiple sensors that may undergo some processing, so it's hard to be certain.
[Android Apps and Games] pakitos:
I changed it myself, wanted to try it out :D
[Android Apps and Games] PaeP3nguin:
Ah, gotcha!
[Android Apps and Games] PaeP3nguin:
New update released. Fairly minor. Removed the "Use acceleration instead" option and put it in the lock selection, which makes more sense. Also added the feature to only lock on the lock screen. This means the app will unlock as usual, but will not lock once you're past the lock screen. This is useful for people who only want Pocket Lock to prevent accidental unlocking in their pocket and don't want Pocket Lock to lock the screen accidentally while in use.

If all you want Pocket Lock to do is prevent accidental unlocking in pocket, enable the new option and change your lock method to not unlock the screen at all.
[Android Apps and Games] 1ce8reaker:
Hi PaeP3nguin,

your app is very amazing and useful!

I have a "problem", I set pocket lock to lock my phone when its facedown and it works very well but when I put my phone faceup on the table (for example when charging) the screen is on and after 2 minutes goes off, pocket lock unlock my phone without my intervention. How can I prevent this behavior?

Thanks in advance.
[Android Apps and Games] pakitos:
Are you sure it is Pocket Lock? Mine doesnt do this.
[Android Apps and Games] 1ce8reaker:
I'm pretty sure because if I stop pocket lock the screen stays off.
[Android Apps and Games] PaeP3nguin:
Hi, interesting issue! The next update should eliminate all sorts of quirks like this, but in the meantime, could you send me a screenshot of the Diagnostics page in Pocket Lock?

Does Pocket Lock wake your screen up again if you use the power button on the phone to turn your phone off?

Thanks for using Pocket Lock :)
[Android Apps and Games] PaeP3nguin:
Actually, I just uploaded the 2.0_Beta to the third post on page 1. You might want to give it a try and see if that has the same problems. Let me know how it works!

Beta link:http://xdaforums.com/showpost.php?p=55114551&postcount=3

I'd actually encourage everyone to try out the Beta! Let me know if there are any problems you find.
[Android Apps and Games] 1ce8reaker:
Pocket Lock wake my phone even if I turn off with the power button.

---------- Post added at 10:57 AM ---------- Previous post was at 10:20 AM ----------

I've installed the 2.0_Beta but not helped.
[Android Apps and Games] PaeP3nguin:
Okay, thanks for the screenshot. I have a feeling it might be you're proximity sensor... Could you change your lock method to only use the accelerometer and let Mr know if that helps?
[Android Apps and Games] 1ce8reaker:
I've tried but not helped.
[Android Apps and Games] PaeP3nguin:
Hmm, try changing your lock method to only use the proximity sensor?
[Android Apps and Games] 1ce8reaker:
I've set pocket lock to lock/unlock only with the proximity sensors and now it works, the screen stay off.
[Android Apps and Games] PaeP3nguin:
Good hear. I'll look into the issue.
[Android Apps and Games] PaeP3nguin:
Quick question, if you turn off face down detection and change your lock method to only use the accelerometer, will the app still unlock on its own when you push the power button to lock it?
[Android Apps and Games] 1ce8reaker:
No.

I've turned off the face down detection and changed the lock/unlock method to use both sensors and the phone stays off.

But now I have another question. Is this a normal behavior?

---------- Post added at 09:41 AM ---------- Previous post was at 09:14 AM ----------
[Android Apps and Games] 1ce8reaker:
Another little issue... When the screen is off and I receive a notification the app don't unlock the phone.

Update: the issue don't happen every time I receive a notification :confused:
[Android Apps and Games] PaeP3nguin:
Oh whoa! That's a crazy amount of battery usage. I don't see why Pocket Lock would use so much, given your settings. Maybe you were testing it a bit in that two hours so it used a lot?

I think notifications that wake the screen are probably related to the individual app, not Pocket Lock. Like snapchat by default wakes the screen, while gmail doesn't.
[Android Apps and Games] 1ce8reaker:
And what does it mean "9h 53m..."? Maybe pocket lock don't let the phone to enter in deep sleep mode?
[Android Apps and Games] PaeP3nguin:
Hmm, I'll do some research. My HTC One has slightly different battery stats so I don't see what you see. I'll try it on my Moto G.
[Android Apps and Games] pakitos:
I subscribed to the thread so I can keep track of everything. :P

That 20h (9h) stat is mental, I unplugged my phone last night before 2am and right now (10:50am) the battery stat for Pocket Lock is 2 SECONDS. However, I have seen a few MINUTES usage before but nothing to really worry about.
[Android Apps and Games] PaeP3nguin:
Yeah, it's pretty crazy! But maybe it's the beta?? I'll need to do some now research...
[Android Apps and Games] PaeP3nguin:
Version 2.0 uploaded to the app store! A highly requested feature, excluding applications, has been added to the application. This is a Pro feature, but unlike Gravity Screen, non-Pro users can select one application to try out the feature before buying. A Pro upgrade is $0.99 USD or whatever the equivalent is for your local currency. I feel that this is a reasonable price (half of Gravity Screen) for an application that I've put a lot of time into. A Pro upgrade enables all pro features now and into the future (lots more planned), supports the future development of Pocket Lock (I'd like to get a few test devices), and helps support me, the lone developer! I'm a college student working towards my computer science degree, so any support helps. Thanks for using Pocket Lock!

Change log as follows:

* Pro feature: exclude apps. Pocket Lock will not lock when using these apps. Non-Pro users can exclude one to try out the feature.

* Pro upgrade. Enables all pro features now and forever. Help support the future of Pocket Lock!

* Feature: Anti-brick protection. Stops bad sensors from bricking your phone

* Performance improvements and bug fixes. Pocket Lock is leaner and greener

I pretty much rewrote most of the code for locking and unlocking the screen to make it simpler and faster. The app should be even nicer on your CPU and battery. I've also removed a small piece of code that may have been causing devices to keep relocking under some circumstances.
[Android Apps and Games] davorzilic:
Today this app is upgraded automatically from play store and since than it crashes constantly. It works for half hour and suddenly crashes. It displays message that something went wrong and that I should restart application. I tried different sensors locking and unlocking but nothing helps.

Previous version works like a charm on my Xiaomi redmi note.
[Android Apps and Games] PaeP3nguin:
Oh no! What do you mean by crashes? And when it crashes is there an option to report the crash? If so, push that button so I can know why it crashed and fix it. Thanks!
[Android Apps and Games] davorzilic:
I didn't get the option to report the crash. If it give me the option I certainly would send you report.

I deinstall the app and install it again, but still no luck.

I took the screenshot at least.
[Android Apps and Games] PaeP3nguin:
Ohh, I understand. Thanks for the screenshots. That's not an actual "crash." Pocket Lock will shut itswlf off if it locks the phone more than 5 times in 10 seconds because sometimes a sensor will start sending incorrect data, which can cause the phone to continuously lock. If you don't have that problem, just turn the "Anti-brick protection" option off. It's at the end of the list.
[Android Apps and Games] PaeP3nguin:
Haha, embarrassing. So I was supposed to write the length of time for the anti-brick protection in milliseconds, but I accidentally put on a few extra zeros, so it would stop if Pocket Lock locked the phone more than 5 times in 10 minutes...

Thanks for finding that. I just uploaded the fix. It'll get pushed to your phone in a few hours.
[Android Apps and Games] 1ce8reaker:
With the last update sometimes the app lock my phone while I'm reading or writing a message or something else.
[Android Apps and Games] PaeP3nguin:
Hmm, sorry to hear that. The last update shouldn't significantly have changed the functionality. You might want to try changing your lock method to only use the accelerometer to lock. Another option would be to use the excluded applications feature to exclude applications you use often.
[Android Apps and Games] 1ce8reaker:
I already use only the accelerometer for the lock method. I'll try excluding the app where the issue happened.
[Android Apps and Games] 1ce8reaker:
The problem does not depend on the app that I use. This happened with Whatsapp and feedly. While I'm reading with my phone in the hand the screen goes off without any movement of my hand that can influence the sensors.
[Android Apps and Games] 1ce8reaker:
There is something wrong.

It is possible that these two things are related?

See the attachments.
[Android Apps and Games] PaeP3nguin:
That certainly is strange... The only thing I can think of is that since the accelerometer isn't that accurate, it may accidentally lock the screen due to movement. I would suggest uninstalling and reinstalling Pocket Lock. You may want to see if you have the same problem with the gravity sensor, which is more accurate, but uses much more battery (you can change from the accelerometer to the gravity sensor in the lock method setting).
[Android Apps and Games] smallpotatoco:
can i set it to not startup on boot?
[Android Apps and Games] PaeP3nguin:
Absolutely. Just uncheck the Start on boot option (near the bottom of the options list).
[Android Apps and Games] pakitos:
I dont think so, while I said before mine never went over a few minutes I just checked mine and it says 6h 8m but mine isnt really messing anything, its working just the way it should work.

Im using 1.5.2 version though.
[Android Apps and Games] PaeP3nguin:
Just uploaded a small update to fix a bug that some users were having when starting the app. Most devices should be fine, it was likely only affecting slower devices or devices that were under heavy load when Pocket Lock was started.
[Android Apps and Games] 1ce8reaker:
I've uninstalled/reinstalled the app and update with the new release and now I'm using gravity sensor instead of accelerometer for the lock method. It seems that all works good.
[Android Apps and Games] PaeP3nguin:
Good to hear!
[Android Apps and Games] castor_t:
Pocket Lock doesn't work

I get message that Pocket Lock has stopped working. The app doesn't work anymore. I uninstalled and reinstalled the app, but still.
[Android Apps and Games] PaeP3nguin:
When does the message appear? Is it whenever you try to start the app? If there's a report button on it, push it so I can try to figure out the problem. Thanks!
[Android Apps and Games] 1ce8reaker:
I think that sometimes pocket lock don't let the phone go in deep sleep mode. Today I have more than 9 hours of awake time under the battery detail of the app. And with trickster I see that my gnex stay more than 14 hours at 384 mhz (more time than deep sleep) and I haven't use my phone for 14 hours.
[Android Apps and Games] PaeP3nguin:
I think you're right. Something definitely isn't working right. I've noticed it on my phone, too. I'm going to try and figure it out and put out an update ASAP.
[Android Apps and Games] pakitos:
I updated to the last version and I am getting 14h as well. I think Im gonna restore from the backup and use it until you find whats wrong. :(
[Android Apps and Games] PaeP3nguin:
Just released a small update that should (hopefully) fix the battery usage problems people are having. A few days of testing on my phone seems to show that the battery usage is back down to normal levels. Let me know how it works for you guys (once you get the 2.0.4 update).
[Android Apps and Games] raul6:
Works well with new update and battery life has improved. For some reason gravity sensor is using less power so I'm using that.

Sent from my Nexus 4
[Android Apps and Games] raul6:
unfortunately it still prevents deep sleep

Sent from my Nexus 4
[Android Apps and Games] tomcaret:
So, what's the reason to use this instead of Gravity Screen Pro?
[Android Apps and Games] 1ce8reaker:
Not here. Until now no battery consumption and my gnex goes in deep sleep mode normally.

Maybe it can help;

My configuration:

Device - Samsung Galaxy Nexus (maguro)

Rom - Omnirom (official build)

Kernel - Fancy r57
[Android Apps and Games] raul6:
Thanks. Restarted phone and it is now going ok in deep sleep. So all good now

Sent from my Nexus 4
[Android Apps and Games] PaeP3nguin:
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!
[Android Apps and Games] tomcaret:
Well, you sold me, will try it out tomorrow! :)
[Android Apps and Games] PaeP3nguin:
Great, let me know how it goes!
[Android Apps and Games] tomcaret:
Installed, tested for 5 minutes and bought the PRO version! I already had bought Gravity Screen Pro but this feels so much better and has some features Gravity Screen was missing. Thank you! :)

Edit: I can't seem to find the right settings for this: I want to lock my phone with the proximity sensor when it's on table face up but it instantly unlocks when I uncover it. I tried to use only accelerometer to unlock but then I have to press a button to unlock, it doesn't unlock when I pick it up from the table.
[Android Apps and Games] Punkiderma:
I'm trying this after gravity screen, I think maybe only one big feature is missing: gravity screen detects if the phone is in your hand by mini shakes, and keep the screen on.

What is your opinion about this feature?
[Android Apps and Games] PaeP3nguin:
The accelerometer unlock is a bit different from Gravity Screen, I think. It detects when the phone changes from face down to face up to unlock, which is what happens when you take your phone out of your pocket when sitting. You can give the phone a quick flip to unlock (turn it face down and then face up), or just set the phone face down on the table.
[Android Apps and Games] PaeP3nguin:
Oh, so that's what the keep screen on by motion option in Gravity Screen meant... I had no idea what it did. Interesting idea, though with the right settings, it probably isn't that necessary. Pocket Lock is mostly intended to just lock and unlock the phone when you put it in or take it out of a pocket, but I'll definitely look into something like that.
[Android Apps and Games] pakitos:
I dont think its necesary to have this, it will bloat the app :silly:
[Android Apps and Games] PaeP3nguin:
Just uploaded version 2.1 onto the Play Store. This version fixes a few small bugs and adds a new pro feature, night mode. You can set Pocket Lock to turn off at night and back on in the morning.

Changelog is as follows:

* Pro feature: Night mode. Pocket Lock will automatically turn off at night and turn back on in the morning to save battery

* Moved some settings to Advanced preferences menu

* Improvements for Only lock on lockscreen option to save power

* Various small improvements
[Android Apps and Games] Punkiderma:
I have a sort of bug: periodically, leaving the phone untouched and face up,my screen turn itself on. Anyone experienced this?
[Android Apps and Games] PaeP3nguin:
This occasionally happens to me to. The reason is likely because the proximity sensor can give false readings sometimes. So when it's sitting there, it might randomly detect "far" rather than close and unlock the phone. There's not too much I can do about it. If you keep the phone face down, the accelerometer should help prevent unlocking.
[Android Apps and Games] Ritwyk:
I'm a sucker for well designed apps. Very nicely done, dude!

It seems aggressive mode relocks the device quickly as soon as it's unlocked. But there is still a small delay (probably the sensor sampling rate) during which it is just possible to dial the last called number. Would it perhaps be possible to disable hardware unlocks altogether while the phone is upside down or the proximity sensor is covered? That would eliminate the chances for pocket dials 100%.

Sounds like a lot of work, though. Any plans to enable aggressive mode (as it is) for the proximeter?
[Android Apps and Games] PaeP3nguin:
Great to hear! On my phone, if you change the lock delay setting to 0 seconds, the screen locks instantly and doesn't even turn on.

I definitely wish I could add aggressive mode for the proximity sensor, but it works a little differently. The accelerometer will send data constantly based on the sensor sampling rate you set, but the proximity sensor only sends data when it detects a change from "near" to "far" or "far" to "near," which saves battery, but makes an aggressive mode difficult. Another problem is that the sensor isn't that accurate, especially when the object is close and has a texture (like the cloth of your pocket), so it wouldn't work well anyways.

Thanks for using Pocket Lock!
[Android Apps and Games] tamcdonald:
I'm loving this app. The only thing I've found that's quirky is in Google now launcher with rotation enabled through xgels xposed module the phone will not lock if the screen is rotated landscape.

Edit: it will not lock in any app that's rotated either. Disabled rotation in launcher and it works fine from home screen but will not lock from XDa app if it's rotated to landscape
[Android Apps and Games] PaeP3nguin:
Hey, glad to hear you like the app! There's actually an option in the advanced options called "Disable in landscape" that stops Pocket Lock from locking the phone when it's in landscape mode. I assumed in general that when people used their phone in landscape, they were actively using it and wouldn't want it to lock. Simply uncheck that box and it'll work as you want!
[Android Apps and Games] PalmTreoAndy:
Not locking when off

I have a Galaxy Note 2. Out of habit I put the screen off and stick it in my pocket. It doesn't lock under these conditions. If I put it into my pocket when on then it locks properly.

My settings:

Locking: Accelerometer

Unlocking: Disabled

Motion Sensor: Accelerometer

Persistent notification: On
[Android Apps and Games] PaeP3nguin:
Hmm, what do you mean that the app doesn't lock when the screen is off?
[Android Apps and Games] PalmTreoAndy:
That is correct. My phone has a PIN due to company Exchange rules. To be clear here are the steps:

Press power button

Put into pocket head first i.e. top facing down

Wait 10 seconds

Take out of pocket

Press Power button

Screen is not locked with a PIN as is should be

The software does work since these steps work:

Leave screen on

Put into pocket head first i.e. top facing down

Wait 10 seconds

Take out of pocket

Press Power button

Screen is locked with a PIN

Diagnostics screen attached.
[Android Apps and Games] PaeP3nguin:
So do you want the phone to always lock with a PIN? Does Pocket Lock lock it with a PIN or not when you turn the phone upside down?

Sorry, I'm not sure I quite understand what the issue is yet.
[Android Apps and Games] pakitos:
What I understand is that Pocket Lock somehow overrides the unlock with PIN and disables it and he needs to have PIN enabled due to company rules.
[Android Apps and Games] PaeP3nguin:
Oh, makes sense. Not sure what I can do about that... there's only one standard way for an Android app to lock the phone, which is what Pocket Lock does.
[Android Apps and Games] PalmTreoAndy:
Sorry the PIN lock comment is confusing you. As you know on Android you have many Unlocking types i.e. PIN, Password, Swipe, Pattern, Face Recognition etc. I am forced to use PIN or Password only by the Android E-mail client and I can't switch this off. This has nothing to do with your app. Your app can auto unlock for Swipe but not for PIN which is what I expect. I am not expecting your app to do anything about the PIN unlocking which is why I disabled the auto-unlock feature of you app.

I want the phone to Lock in my pocket so I can't make calls by accident. I am saying that the phone does not auto-lock when I switch it off and put it in my pocket. It only auto-locks when I put it in my pocket while it is on.

Thanks again for the great app. I paid for the Pro version to exclude operation on apps like the camera.
[Android Apps and Games] PaeP3nguin:
Oh, that makes sense. Thanks for the clarification! You should try checking the "Aggressive mode" option in Pocket Lock which will auto lock your phone if it turns back on accidentally.
[Android Apps and Games] PaeP3nguin:
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!
[Android Apps and Games] mariosraptor:
You have to go at : settings-security- and select "power button instantly locks" setting.
[Android Apps and Games] vNa5h:
The lock unlock count is incorrect

Tap-a-talked from the MOTOG
[Android Apps and Games] fishyweb:
Hi. Just downloaded this yesterday - great app!

I noticed a small issue. I have the lock method set to accelerometer only. I use my phone in a car mount in portrait mode, running Waze fwiw. I noticed that when I drive over a rough section of road, the screen sometimes locked, presumably due to a false reading from the accelerometer. Any advice on how to prevent this issue?

Also, I'm finding a similar issue to one of the other users where, when taking the phone from your pocket and placing it face-up on a table, the screen comes on for a few seconds. Is there any way around this? Note that I'm using proximity and accelerometer for unlocking.
[Android Apps and Games] fishyweb:
OK - I've found that changing the Unlocking Sensor to use just the Proximity Sensor has solved both of these issues. Think I'll be going Pro :)