Use proximity sensor to disable screen while in pocket - Desire General

Hello,
As many users, I've experienced the problem that when the desire is in my pocket and I receive a notification, the screen gets accidentally unlocked and the phone starts doing things that I don't want it to do.
I know I can add an unlock pattern so that it won't unlock as easily but this is at the expense of me having to enter it even in situations I would not have needed it.
So I thought that maybe we could use the proximity sensor to tell the phone to never unlock the screen if an object is close to the phone.
Quickly looking at the android docs, it seems that the support for this is in the SDK, but I was wondering if anyone had created an application that does this.
If time permits, I might even have a look at doing it myself, but as I'm very new to Android development, it will take me quite a long time to get to a usable state, hence my question about an existing app that does this.
Regards
Olivier

Well, I created an application that respond to the proximity sensor events, but I can't seem to be able to disable the screen like the call application does.
There might be some undocumented methods but I would very much prefer a supported API.
Does anyone have any idea?

Related

locking/unlocking programs and battery consumption

i was wondering if i could get sum people to tell me about ehir experiences with their locking/unlocking programs...such as, which ones youve used with success...im interested in knowing which ones use the least about of battery power, least amount of memory/ram...so on and so forth...any input wiould be greatly appreciated
specifically programs being used with the touch pro 2
I'm personally not a big fan of screen lock programs. I just think that for something as simple as locking the screen, the end-user shouldn't have to give up anything in terms of resources/battery life.
That's why I suggest sticking with the default WinMo lock.
I suggest either SmartLock or LockDevice to auto lock your device. Neither uses up any resources.
I've perused the threads concerning both the locking apps you cite above, but both appear to have some issues (i.e. not everything working properly after the install). I'm specifically looking for a way to have the screen locked when the device is turned on, mostly because I carry the thing in my pocket (yes, with a screen protector) and want to be sure that if I should inadvertently bump the power button I don't end up calling friends overseas from the inside of my pocket. It doesn't appear to me as if the default locking app can do this (and not simply turn on the lock after a timeout) -- or am I missing something?
pistou said:
I've perused the threads concerning both the locking apps you cite above, but both appear to have some issues (i.e. not everything working properly after the install). I'm specifically looking for a way to have the screen locked when the device is turned on, mostly because I carry the thing in my pocket (yes, with a screen protector) and want to be sure that if I should inadvertently bump the power button I don't end up calling friends overseas from the inside of my pocket. It doesn't appear to me as if the default locking app can do this (and not simply turn on the lock after a timeout) -- or am I missing something?
Click to expand...
Click to collapse
I've used both of those apps and it works fine for me. I have the exact same concern that you have. I don't want the device to wake because someone called and hung up after a second, thus making the screen susceptible to taps.
In both apps, you can customize how you want the lock mechanism to kick in. You can set it to lock when you screen goes off. My personal preference is to set it to lock on suspend.
I'm not really sure what you mean. If your device is locked (with the WinMo default lock), you won't be able to do anything (including making calls) without unlocking it first either via tap & slide (WinMo 6.5) or left soft key & unlock button (WinMo 6.1).
I would really like to use the app, but there is a dialer conflict when getting incoming calls for boths apps. For example during an incoming call, I initially get HTC dialer. During the middle of the call, I get the original WM dialer. Do you have any suggestions to avoid this problem?
ohyeahar said:
pistou said:
I've perused the threads concerning both the locking apps you cite above, but both appear to have some issues (i.e. not everything working properly after the install). I'm specifically looking for a way to have the screen locked when the device is turned on, mostly because I carry the thing in my pocket (yes, with a screen protector) and want to be sure that if I should inadvertently bump the power button I don't end up calling friends overseas from the inside of my pocket. It doesn't appear to me as if the default locking app can do this (and not simply turn on the lock after a timeout) -- or am I missing something?
Click to expand...
Click to collapse
I've used both of those apps and it works fine for me. I have the exact same concern that you have. I don't want the device to wake because someone called and hung up after a second, thus making the screen susceptible to taps.
In both apps, you can customize how you want the lock mechanism to kick in. You can set it to lock when you screen goes off. My personal preference is to set it to lock on suspend.
Click to expand...
Click to collapse
Thanks: I've loaded lockDevice and so far so good
ohyeahar said:
I'm not really sure what you mean. If your device is locked (with the WinMo default lock), you won't be able to do anything (including making calls) without unlocking it first either via tap & slide (WinMo 6.5) or left soft key & unlock button (WinMo 6.1).
Click to expand...
Click to collapse
What I meant was that my understanding of the default WinMo lock is that it only locks after a specific period of in activity (which I don't want to happen) rather than after a suspend (which is what I do want).

[Q] Lock screen and unlock pattern

Hi All!
I found a few threads on the Internet in different forums with no answer so I thought I'll ask the pros:
When I'm using Pin or Password to unlock the phone, I get the standard lockscreen display before I can unlock the phone, so it goes:
On/Off Button -> Lock Screen -> Pin / Password
The problem is when I'm using an unlock pattern, the lock screen gets skipped, so it goes:
On/Off Button -> Unlock Pattern
This is very annoying since I like to use the lockscreens mute function without having to unlock the phone. Apparently there is no way of changing this with settings so I was wondering if anyone know of a patch or another way to have the lockscreen AND the unlock pattern?
I'm using the Oxygen 2.0 RC6 Gingerbread Rom on my Desire but this seems to be a generel "issue" with stock Android Roms (Hero Roms and Froyo Roms is the same) - Sense based Roms behave different.
Thx for any hint!
*bump*
I am having a similar issue and my searching only found this thread.
While at work (2/3rds of my waking life) I use my phone at work to see where my next appointment is. It's very convenient to just glance down and see what meeting I have next by only hitting the power button. From what I have seen there are a lot of apps which will add this functionality to the lock screen.
The problem is when I add a passcode (required by work) it replaces the unlock screen with the passcode screen. I have seen that other Android phones do not do this, but the Captivate does. I've tried four different roms and all have this same behavior.
Is it possible to have the unlock screen come up, and when the phone is unlocked to prompt the passcode? I can't find a setting anywhere and the third party apps like Flylock have a jarring user experience in this configuration.
Thanks
...
Mabus the Mad said:
Is it possible to have the unlock screen come up, and when the phone is unlocked to prompt the passcode? I can't find a setting anywhere and the third party apps like Flylock have a jarring user experience in this configuration.
Thanks
Click to expand...
Click to collapse
The purpose of the pattern lock is to prevent unauthorized use of the phone. So it doesn't make sense if you put the lock screen over the pattern lock(or combined them) as you, or any stranger, will be able to issue commands(mute, read messages, weather, music etc. there are lots of widgets running on the lock screen) to the phone BEFORE unlocking it.
The security of the pattern lock will be totally compromised.
So the only choice is pattern lock over lock screen. I don't see how this makes anything easier. And I won't go into how it will create huge security loopholes/bypass the pattern lock completely if widgets or anything is allow to run on/over the lockscreen.
Perhaps I am using the wrong terminology, I should be referring to it as the "Unlock Screen" (Settings -> Display -> Unlock Screen). From this screen it appears that you can:
1) View the time
2) Unlock the phone
3) Mute the phone
4) See the notification bar (Vibrate, Battery, Signal, Pending notifications, etc)
I would actually like to add:
5) Next calendar appointment with location
6) Weather
This is all actions / information I want available at a glance and without unlocking the phone. Once I attempt to unlock I would like to be presented with the pattern / pin security. In this way all my private information remains hidden, but the information I use the most often while walking / driving is readily available.
I am also good with anyone else being able to pick up my phone and perform the actions I listed on the unlock screen. I believe this information is available from the unlock screen on the Windows Phone and iPhone (assuming it's your only notification, their notification system sucks).
Mabus the Mad said:
This is all actions / information I want available at a glance and without unlocking the phone. Once I attempt to unlock I would like to be presented with the pattern / pin security. In this way all my private information remains hidden, but the information I use the most often while walking / driving is readily available.
Click to expand...
Click to collapse
That PERMISSION to allow you do issue commands to your phone will compromise the security of the pattern/pin lock screen. You need to understand the core concept of the pattern lock screen is to be secure - no unauthorized use of the phone, whether it's as small as viewing notifications to fullon running widgets/apps.
Plus your definition of being secure doesn't equate to everyone's definition of security. It fine for you to display messages on the securely locked phone but it's definitely not for some of my friends who have really sensitive data on their phone.
I was not trying to advocate this behavior to everyone, just wondering if it was possible to set this up myself. One of the things I like about this phone is that everyone can customize it to fit their own tastes.
Actually, I think I found my solution. Flashed to CM7 last night. The pattern screen still had the behavior as the 2.2 roms but the passcode had the behavior I was looking for.
Well the thing is: When using PIN or Password to unlock, you can actually use the lockscreen to mute etc. before unlocking. And using the original HTC Rom, this is possible using unlock pattern, too. Everyone will have to decide for themself if he cosiders this function a thread to security, its just really annoying that I have to decide between unlock pattern and unlock screen even tho it should not be a problem technicaly. Cyanogen guys apparently have this on their list, but with minor priority. I'm really close to moving back to a HTC rom actually...
this bugs me too.. I like the PATTERN cause it's kind of unique and cool plus when you enter your pattern there is no "OK" key you have to press like you do when using PIN/PASSWORD which for some reason annoys me.. I suppose it's another line of defense against prying eyes that make it that much more work to try different pin options.. I don't know maybe it's to annoy them into giving up?.. Anyways, I've opted to use the PIN option because I too like seeing the Lock Screen and any info it has and I really don't see it as that big a security hole seeing the small amount of info on the lock screen.. unless you're running a ROM or app that has popups for messages and such.. and if it really is then Google should make the behavior that you do pattern then to the lock screen. of course I'm sure their reasoning for this is the pattern is a more difficult form of security to breach so there is benefit and no harm from taking you straight into the unlocked phone once the correct pattern has been entered. that doesn't mean we have to agree with the mighty G on this and I'm sure either Devs cooking in the ROM kitchen could change the behavior if they saw the want in the community, maybe a patch could be made or an app that changes the behavior. anyways, that's my $.02
If any of you guys find a solution around this issue please let us know!
Haven't seen any solution yet, how about you guys?

Can I prevent screen on when answer call?

Hi
I've had this problem since my first smartphone but lately it really had an impact on my work since i started shoving my phone in my jeans back pocket.
Description:
1 Phone in pocket.
2 Answer call via bluetooth earpiece.
3 Screen goes on and a multitude of actions are executed from screen touching my butt inside pocket.
4 ...or call is simply terminated by my butt pressing end call button.
Research:
I can't find a stock rom setting to adress this issue.
I've tried to use tasker but can't find trigger nor action to adress the issue.
I've tried 3rd party apps that target proximity sensor and assign actions. If sensor is covered when answering call, one needs to uncover it and recover it to make it turn screen off.
I've read scores of threads that approximately adress this issue, but fail to deliver solution.
I've read a handful of threads that exactly adress this issue. None of the threads have even been answered.
My idea:
An app similar to other apps that use proximity sensor to turn screen off, with the addition that it triggers by phone hook off state.
As you might well understand I have a layman's grasp of this, otherwise I'd be asking better informed questions.
Thank you for your time and please only answer if you actually have a contribution to the topic or a solution. +1:s are referred to the thanks button.

First thoughts and mods I'd like to make.

The phone itself is really nice. There are few functions that I would like a dial-up, and a couple of critiques.
These are all connected in some way to Google assistant I believe.
1: the phone will not activate using the voice phrase, unless I unlock the phone first. This defeats me using the phone hands-free while I drive. Also, when the screen goes into sleep mode, the phone will not respond okay Google or hey Google at all.
2: when I tell Google voice assistant "take a picture" it opens the camera app, but does not snap a picture I Once again I have to do it manually. I'd like to just say it and have it take the picture.
3: I have heard that there will be a change that will allow people to create a custom wake up phrase? That would be great
4: Since I have the fingerprint scanner, I do not want to use the pin or any other screen lock. Is there a way to turn these features off and simply used the fingerprint scanner?
Thanks again, thanks for your patience while I Noob out on this new product.
PM
papamalo said:
The phone itself is really nice. There are few functions that I would like a dial-up, and a couple of critiques.
These are all connected in some way to Google assistant I believe.
1: the phone will not activate using the voice phrase, unless I unlock the phone first. This defeats me using the phone hands-free while I drive. Also, when the screen goes into sleep mode, the phone will not respond okay Google or hey Google at all.
2: when I tell Google voice assistant "take a picture" it opens the camera app, but does not snap a picture I Once again I have to do it manually. I'd like to just say it and have it take the picture.
3: I have heard that there will be a change that will allow people to create a custom wake up phrase? That would be great
4: Since I have the fingerprint scanner, I do not want to use the pin or any other screen lock. Is there a way to turn these features off and simply used the fingerprint scanner?
Thanks again, thanks for your patience while I Noob out on this new product.
PM
Click to expand...
Click to collapse
I guess you are on miui? miui is not really google-smart-lock friendly, and i think not all smart-lock features are supported by miui. you could install some miui-xposed modules or you should try out a custom rom like omni or rr then all your problems are gone.
You can voice unlock your phone, but your screen must be on. You cant unlock your phone while locked + screen off with your voice.
Taking a picture by voice is working for me without any problems, but i guess this is because i am on a custom rom.
You could remove your pin/pattern by deleting some files in twrp, but this is not recommended at all. Its always better to have a backup for your fingerprint and you dont need to use your pin at all anyway, since you just put your finger on the sensor and it will unlock your phone without a pin/pattern.
If you dont want to unlock/root your phone then you have to live with some missing features i guess, but you should give Android Auto a try, if you use your phone alot while driving.

Bizarre BUG HELP: Suddenly Can't set number/ pattern lock without adding fingerprint

Hi there, Please help me with this weird bug in my MM3's lock function. I haven't read about it anywhere else and I did not update or tweak my rooted system in any way so I'm at a loss as to what caused this probleman d how to fix it.
I am no longer able to employ a simple numerical or pattern screen lock. I go to settings, choose and then confirm the number or pattern, and hit accept -- at which point it asks me for a fingerprint (which I do not want to add) and when I hit cancel, the phone remains unlocked. If I hit add a fingerprint and refuse to present my finger, the phone also remains unlocked. This is so freaking weird!
(MM3 rooted but on stock Android 9 PKQ1.181007.001 -- Miui Global 11.0.6 Stable)
Honestly, I wouldn't give a damn as I never use a screen lock except I am in fact forced to use it every few weeks or whenever I want to review my Brave browser passwords. It forces me to set a lock screen in order to see them. So if there's a workaround just to see passwords, that would do me fine.
Because the basic number and pattern locks aren't functioning properly, I wouldn't even consider adding a fingerprint (and in fact, I have never done so. I have a probably irrational distrust of fingerprint, voice and retina security ... plus I live alone so such measures aren't necessary)
Can anyone give me any clues as to what could be causing this and how to fix it or get around it? Or even if there is a way to see my Brave passwords without employing a lock?
Theoretically, I could try temporarily installing a fingerprint lock which I could then remove after reviewing my Brave passwords. But I have an irrational dislike of fingerprint, voice and retina locks and never use that stuff. Moreover, given the basic number and gesture locks aren't functioning properly, the last thing I want to do is try a fingerprint.

Categories

Resources