Disabling power button long press/disabling "phone options" - Android Software Development

I'm using an alarm clock called Morning Routine. It's great since I'm a heavy sleeper, but I have one problem with it. While the program DOES lock the screen and keep me from going home and closing the app, I can still long-press the power button, access the Phone Options menu, and turn the phone off. I'm a heavy enough of a sleeper that I figured out how to do this while still half-conscious. So, I was wondering if it is possible to develop a script to temporarily or permanently do one of the following:
1) Disable the long-press of the power button to launch the Phone Options menu.
2) Remove Power Off from the Phone Options menu (I know some ROMs add Reboot to this menu, so theoretically, couldn't something be removed?)
3) Re-map the long-press of the power button to another function (thereby disabling the Phone Options menu)
None of these will be a problem if they are permanent - I can download an app that will allow me to shutdown my phone from a widget instead of the power button.
Oh, I'm on the crappy ol' Samsung Moment
Admin, feel free to move this if necessary.

+1.
has ANYONE got a fix for this pls?!?! my daughters are driving me CRAZY turning my GTab off...

Try Button Remapper: http://forum.xda-developers.com/showthread.php?t=850464
As for the reboot option in the power options, have a look at this then reverse the process: http://forum.xda-developers.com/showthread.php?t=811532

you could just get your daughters to not turn off your device...

That's really unhelpful.
I have this issue too - on an HTC desire running DevNull ROM. (Also happens with Oxygen - tried it.) http://forum.xda-developers.com/showthread.php?p=14709327
Please help!

Related

'Device locked' on Today screen doesn't work, right?

Hi all, if you try the following...
1. Click 'Device unlocked' on the Today screen so it changes to 'Device locked'
2. Turn device off / wait for it to go to sleep
3. Turn device on / wait for something to wake it up
...the device has unlocked itself, correct or is it just my Xda Mini S?
So how are we supposed to lock the device properly from accidentaly screen taps -- a problem I keep encountering?
Also, is there any way to add a timeout to the device lock, so if the screen isn't tapped for 5 mins, it automatically locks (assuming we actually make the lock feature work in the first place!).
My K-JAM used to do this all the time.
I never actually worked out the exact cause, i have a feeling it may have been caused by software i was testing when i 1st recieved the k-jam.
It stopped doing it altogether after a recent hard reset.
Sorry i wasnt more help.
Cheers
Chris
the device lock wasn't made with these systems in mind... it's intended for smartphone devices which don't have a 'suspend' state - let alone a button you can push to put it into, and bring it out of, that state.
If you want a free, proper locker, put the following in your today-screen-app-launcher of choice:
http://www.pocketgear.com/software_detail.asp?id=14621
This'll 'lock' even the on/off button (immediately 'locks' again if you try to turn it back on, or shut it off (by holding down the on/off button - as you need to confirm by dialog)).
On the down side, it'll also turn your display off.
To unlock, on the Wizard, you need to press the Messaging (top-left, front side) button and the Voice Dial/Memo (top-right, side) button at the same time.
That lock/unlock feature on the Today screen is pretty crappy actually. I locked my keys religiously. And half the time, I would pull my phone out and it was on a webpage or on my email... and I never opened them.
I'm hoping they fix this...
-Mc
Well it's ridiculous that O2 etc. keep the function enabled by default on the Today screen of their units, if the feature is for Smartphones only! But then, there's a lot of things O2 don't understand about the world but don't get me started on that.
Warning! Do not use Screenlock!
Warning: I think this program just killed my Wizard. Don't install unless you know the risks.
http://forum.xda-developers.com/viewtopic.php?p=212261#212261
People, please don't recommend software on here that is not tried and tested on WM5.0.
On my Qtek 9100 it works. The only button that doesn't lock is the power button. Accidental tap of the power button will turn the screen on. You cannot even press and hold to power off when locked. When phone comes back on it stays locked.
I have been using this application for a while now - but I think the warning for installing sofware goes for all software. Who is to say that SPB doesn't install something that 'phones home'? Or that Mort Script doesn't cause irreperable harm to the registry stack when using its registry functions?
I've had no problems with it, but I guess I'll continue in your other thread.
I also can't just quickly tap the on/off button. Sure, it goes on - but it then immediately goes off again as well.
Thanks. What happens if the device crashes or you soft reset whilst the screen is locked? Does it reboot unlocked with the screen on? I wondered if mine had somehow locked completely, so the screen is off when it reboots ...but that wouldn't explain no LEDs working either :?
I don't know about crashes but, with some reluctance - admittedly, I tried the soft-reset (pin button at the right) while the screen [w]as locked...
...the device switched off, switched back on, booted up, and displayed my Personal Info screen.
So... no problem there, sorry :/
Well I have my replacement Mini S now. Any other programs than ScreenLock that do this? I'm sure I found once, but I can't find it any more :?
I couldnt get screenlock to work on the ppc6700, but mortsaver worked just fine, you might want to try that.
I'm perhaps misreading this, but the device locking seems to work ok for me on my XDA Mini S. Once I've locked the Mini S the only way I can use it again is to unlock it - if I touch the power button or let it go standby itself, when I touch the power button to wake it up, it remains locked. Also, if I hold down the power button for five seconds or more the Mini S will not give me the option to switch off entirely.
John
Hi John,
Do you have a Device Password setup? ( Start > Settings > Personal > Password > [x] Prompt if device unused for... )
I find that when
1. Device Password is enabled
2. you lock the device
3. you press the device on/off button (goes to standby)
4. you press the device on/off button again (goes back on), the device is unlocked.
When Device Password is disabled, and you then follow steps 2-4, the device remains locked
In my experience this is true [it sort of makes some sense you can't type in your password with the device/screen locked].
it would make sense if...
A. the password dialog would actually pop up (note that if you turn the device off/on manually, before the password prompt timeout, the password dialog does not show up)
and
B. they would first show the unlock screen and -then- the password prompt
The password prompt facility effectively overriding the unlock screen is just bad software design.
well put zeboxx... i wanted to say something in those lines but couldn't articulate them properly [ended up with a it sort of makes some sense jibe...]
ZeBoxx said:
Hi John,
Do you have a Device Password setup? ( Start > Settings > Personal > Password > [x] Prompt if device unused for... )
I find that when
1. Device Password is enabled
2. you lock the device
3. you press the device on/off button (goes to standby)
4. you press the device on/off button again (goes back on), the device is unlocked.
When Device Password is disabled, and you then follow steps 2-4, the device remains locked
Click to expand...
Click to collapse
Nope, I don't have a device password enabled which explains it.
John

Locking the HD

Hi all,
I have decided to uninstall S2U2 and I don't want any other locking applications. However, is there is a way I can have the standard device lock activated with a short press of the power button?
Currently I am having to hold the 'End call' button until it locks, then turn the screen off with the power button.
Thanks
I have a pin setup and use the short press of the power button to put the phone into powersave 0 whixh then outs the phone into pin lock after a short while
If you push the hang off button for more than 10seconds, it will be locked
No...
FetchBLN said:
If you push the hang off button for more than 10seconds, it will be locked
Click to expand...
Click to collapse
I don't know about your device...
On my HD you can press the end button and count until 3, and the device is locked
I can't remember whether it's in HD Tweak or Advanced Config, but there's an option to automatically lock the keypad on screen turning off (both timed out or power button press I assume, but not tested) so you could try that?
Edit: instead of being lazy I actually looked it up - it's in HD Tweak, option 4.1; Lock -> AutoLock
Just tried it and it works, turn backlight off by short power press and it's locked a well as screen turning off!
Good tip: works for me!
By the way: you can configure what happens when you pres the "disconnect" button too.
Guys
Thanks for this thread. I am very confused when it comes to locking the phone. Can anyone tell me...
Does the built in device lock work well? Will it keep the phone locked when a call comes in ?
If so, then why do people use S2U2 or other third party apps? Also some people say that S2U2 drains the battery. Is this true? How does it drain the battery?
The HD tweak had the disadvantage that when the screen turns in 'shaded' state the device is also locked.
Then when unlocking the device the screen stays 'shaded'.
avimak said:
I don't know about your device...
On my HD you can press the end button and count until 3, and the device is locked
Click to expand...
Click to collapse
Maybe it takes you 10 seconds to count to 3.
I've finally got there with locking my HD... I had a S710 before the HD, and I liked the fact that on that I could hold down the "end call" button, and that it would lock the phone and turn the backlight off. The screen would then turn off completely after whatever time I had entered (2 mins I think). And on unlocking the device the backlight would turn on.
On my HD I have now disabled the device password, but enabled my PIN request, so that it secures the phone if it has been turned off completely. This means that I can now hold down the "end call" button for 3 seconds or so and it locks the device (requiring a 2-tap process to unlock, like the S710). I have also used the standard windows mobile settings (power) to have the backlight automatically turnoff after 30 seconds, and have used HD Tweak (setting 4.1) to autolock the device when the backlight turnsoff. The only problem is that when AutoLock happens using HDTweak, when I unlock it the backlight fails to turn back on, even once I have started using the screen. Any ideas on how to fix this?
Dave
chaosdefinesorder said:
I can't remember whether it's in HD Tweak or Advanced Config, but there's an option to automatically lock the keypad on screen turning off (both timed out or power button press I assume, but not tested) so you could try that?
Edit: instead of being lazy I actually looked it up - it's in HD Tweak, option 4.1; Lock -> AutoLock
Just tried it and it works, turn backlight off by short power press and it's locked a well as screen turning off!
Click to expand...
Click to collapse
Just to confirm my above question regarding this specific feature of HD Tweak... I have got this working on my HD now too, but when it autolocks, and I unlock it, the backlight doesn't turn back on, and the only way to make it turn back on is to hardbutton off and on the device (not power-off, just press the button the top of the phone and press it again).
This is stopping me from using the HD Tweak autolock now, which is annoying because it does precisely what I need! Can anyone offer any advice?
I've just realised that it actually says within HD Tweak itself (on 4.1 option selector) that this is a known issue... any idea on if and when it will get fixed?
How about using Gyrator to lock the device? I have set it to lock the device and switch off the screen on inserting the stylus. Also, I have it set to unlock and switch the PDA on when the stylus in removed.
Simple. Works for me, anyway!
james00000007 said:
I have a pin setup and use the short press of the power button to put the phone into powersave 0 whixh then outs the phone into pin lock after a short while
Click to expand...
Click to collapse
Hi,
Is this similar to an application my friend had on his iphone. Basically, when he needs to use the phone, he needs to put in a pin to unlock. I think the Nokia E61 has a similar feature.
nikki-m said:
How about using Gyrator to lock the device? I have set it to lock the device and switch off the screen on inserting the stylus. Also, I have it set to unlock and switch the PDA on when the stylus in removed.
Simple. Works for me, anyway!
Click to expand...
Click to collapse
Can u let us know how to u set it?
nikki-m said:
How about using Gyrator to lock the device? I have set it to lock the device and switch off the screen on inserting the stylus. Also, I have it set to unlock and switch the PDA on when the stylus in removed.
Simple. Works for me, anyway!
Click to expand...
Click to collapse
i hav a qns, at the locked screen, when u rotate ur device, does the screen rotate as well???
i had tis problem whn using gyrator to lock, whn its lock at home screen, the screen wil rotate if i rotate my device. how to disable that???
davehodgkinson said:
Just to confirm my above question regarding this specific feature of HD Tweak... I have got this working on my HD now too, but when it autolocks, and I unlock it, the backlight doesn't turn back on, and the only way to make it turn back on is to hardbutton off and on the device (not power-off, just press the button the top of the phone and press it again).
This is stopping me from using the HD Tweak autolock now, which is annoying because it does precisely what I need! Can anyone offer any advice?
I've just realised that it actually says within HD Tweak itself (on 4.1 option selector) that this is a known issue... any idea on if and when it will get fixed?
Click to expand...
Click to collapse
Mhh, I also think it's very annoying. I first used the auto lock feature by setting
HKey_CURRENT_USER/ControlPanel/BackLight/AutoDeviceLockEnable = 1, but I also have the backlight-issue, which is really annoying.
I also installed S2U2, but after installing that program the battery-life was inacceptable. By now I'm using the manual method, pressing hang-up for 3 seconds. It works, but I often forget it, and it then happens easily that I press the hard-button which awakes the phone from standby and I make pocket-calls.
The auto-lock feature is also exactly the thing I need, except the fact that I get the backlight issue then. Does anybody know how to fix the backlight issue? Maybe by editing another key in the registry?
Regards,
Tobi
As I said in the hint topic, in order to lock my device I just press the power off button (this activate the stand by), simple and fast
I use S2U2 at first, but it drains power too much, so I uninstall it after 2 days.
Then I use your method - hold the end call button to lock the device.
Now, I change the right softkey to invoke a small application that will turn off the machine (just like press power button). When I take out the stylus, the machine will on again.
Thus, I don't need to press any button, and I feel it is better......personally.......
stm2008 said:
I use S2U2 at first, but it drains power too much, so I uninstall it after 2 days.
Then I use your method - hold the end call button to lock the device.
Now, I change the right softkey to invoke a small application that will turn off the machine (just like press power button). When I take out the stylus, the machine will on again.
Thus, I don't need to press any button, and I feel it is better......personally.......
Click to expand...
Click to collapse
which application are you using now to turn off the screen? sounds interesting.
Tyrion84 said:
As I said in the hint topic, in order to lock my device I just press the power off button (this activate the stand by), simple and fast
Click to expand...
Click to collapse
Yes, but when I activate standby and put the phone into my pocket, I often accidently hit the button again, which reactivates the phone. hit_one_button_to_unlock ist not tobi-proof

HTC HD2 Lock problem. please help!

Hey all i installed BSB tweaks on my phone and i think i have disabled the lock feature on the phone when pushing the hangup button (hard button). To lock the phone i need to click start---then lock on the touch screen. bit of a pain as i would like to do it with the hard hangup button. when i push it instead the screen turns off, then if i push a button it wakes. can anybody help please. i tried searching the forums but couldnt find anything on it. cheers.
This happened to me too, but it seems like (at least that's how I recall it) the last thing I did before this happened is setting an alarm, turn off the phone (or maybe not, I am not sure) and when I dismissed the alarm, the "off" button started to just turn off the display isntead of locking the device
theemed said:
This happened to me too, but it seems like (at least that's how I recall it) the last thing I did before this happened is setting an alarm, turn off the phone (or maybe not, I am not sure) and when I dismissed the alarm, the "off" button started to just turn off the display isntead of locking the device
Click to expand...
Click to collapse
Hey i also had this problem afer installing BSB Tweaks, it hink all you have to do is when the phone it on hold the power key stil it comes up with the options to power off or lock and that....then simply select lock device and it should go back to normal!

Bypassing the power button

Sorry if this is a repetition, but couldn't find a satisfactory answer anywhere else.
The thing is I hate using the power button to wake my phone up. I don't mind the pulling down of the bar on the screen (which is the second step), but constantly fiddling with my power button each time I have to unlock it doesn't gel well with me.
Is there any way one can bypass the first step? I am using an app called Lockbot, but the problem with that is that when I receive an incoming call, it automatically unlocks my phone.
So basically looking for an app which uses any of the front buttons (as first step) and then either the pull-down-bar or an iphone type slide or an eclair type rotating as the second step. Also don't want the phone to unlock all by itself when getting a call.
(Do Lock 2.0 / Keyguard Disabler help here?)
Is your phone rooted? There is such an option in the cyanogen mod to wake up via the trackball
No it isn't, and wouldn't like to root this to be honest. Any apps available for this?

Power Button broken - Please Help!

Dudes!
Bros!
My power button has stopped responding!
Phone has fallen a few times, so that obviously must be why.
The phone is on right now, and I've set the phone to "Always On Display" because if the screen times out, there's no way to turn the screen back on, unless I call my phone, at least, not that I know of.
I've gone into Developer Mode and turned on USB Debugging.
Now, given that this is a hardware issue, which I know nothing about, and that there are lockdown restrictions in my hood, at the moment, I'm unable to get the phone checked.
So, can you savvy power users (pun not intended) please help me with how to turn the phone on and off without a working power button?
Can I connect my phone the PC and do it like that?
Or can I enter into boot menu without using the power button? (I haven't checked out how to get into recovery mode on this device.)
Just looking for a temporary way to turn the phone on and off, and find an alternative to the power button, until I can get the power button checked.
I can't even turn the screen off so it's draining my battery like crazy!
Thanks for reading, brothers!
Hope someone can help me out!
Cheers.
wokeaf said:
Dudes!
Bros!
My power button has stopped responding!
Phone has fallen a few times, so that obviously must be why.
The phone is on right now, and I've set the phone to "Always On Display" because if the screen times out, there's no way to turn the screen back on, unless I call my phone, at least, not that I know of.
I've gone into Developer Mode and turned on USB Debugging.
Now, given that this is a hardware issue, which I know nothing about, and that there are lockdown restrictions in my hood, at the moment, I'm unable to get the phone checked.
So, can you savvy power users (pun not intended) please help me with how to turn the phone on and off without a working power button?
Can I connect my phone the PC and do it like that?
Or can I enter into boot menu without using the power button? (I haven't checked out how to get into recovery mode on this device.)
Just looking for a temporary way to turn the phone on and off, and find an alternative to the power button, until I can get the power button checked.
I can't even turn the screen off so it's draining my battery like crazy!
Thanks for reading, brothers!
Hope someone can help me out!
Cheers.
Click to expand...
Click to collapse
Double tap on the screen does not activate the display?
There are some options in accessibility settings. Maybe there you will find a feature that can help a little bit.

Categories

Resources