Source code to disable Home and Back Buttons? - General Questions and Answers

Hello.
I've developed an application for HTC Mobiles, and I've just received a Diamond. Mi app hides Windows Mobile, but in this device you can press the Home Button to exit to Today screen, and I'd like to disable it.
I've downloaded Dredsensor, which works perfectly and allows a lot of things more, but I'd need to implement it in my application, and I only need to disable the buttons.
How could I do this?
Thanks,
Enrique

Related

Control phone application behaivor

Novice here ...
WM6 Pro on a T-Mobile Wing. Used in corporate environment with exchange, which forces security settings on the phone, like locking the phone after X minutes.
I wonder if there is a way to force the phone app to launch when pressing the green button or clicking on "Answer" without having to key in the 4-digits code and make the application display the keypad.
Any advice will be highly appreciated.
phermi

where is the Start - Settings - System Key Lock?

hi, i can't seem to find keylock application that locks all hardware buttons but power when device is on sleep mode. have you got it on yours? i had it on my old tytn II
do you have a
settings->buttons->lock ?
no. have you? i've got only Program buttons, Up/Down Control and backlight tabs there
hmm...you mean setting up a lock to turn off all keys until you hit Unlock then confirm by tapping the key on the screen?
Press and hold the "End" button and that locks the device.
It is configured under start>setting>Long key press.
MIGHT NOT be the thing you are meaning though.
no, you know when you pres power button phone goes sleep mode? there should be a setting where you can decide if you want to allow other hardware buttons wake phone from sleep or other wise.
currently which ever hw button i press phone wakes up i.e send (green) button, terminate call (red button) or action (round) button.
this is no good when phone in your pocket. a small touch to any of them wakes phone up. i thought it is standart wm option as i had it since wizard
Hmm, when i power off the only thing which will power back on is pressing the power button, opening the keyboard or removing the stylus?
I've just got a touch pro and when I power off, no other buttons will wake up the phone.
That being said, I still have my Tytn II and the Key Lock application is found under Start...Settings...System...Key Lock. The Long Key Press app is not what you're after.
It seems strange that your Touch Pro wakes up on any button push. Maybe you need to change a registry setting instead?
wierd ; on mine apart from those, any button powers it up. only config tool i used is advanced confing and there isint any setting regarding this on that tool
inspectorgadjet said:
Maybe you need to change a registry setting instead?
Click to expand...
Click to collapse
do you know which key i should change?
On touch Pro there is no Keylock option in the settings.
Only way how to activate the device is to:
1. press power button
2. open the keyboard
3. take out the stylus
There is no config like on the HTC Touch/Diamond.
I've contacted Julien Schapman, vendor of advanced config and asked him to add this settings to his application.
this is his answer:
Ok I will look at it when I could get a Touch Pro.
Best regards,
Julien Schapman.
So I hope his new version will have this settings. This is really missing.
But maybe someone is able to export this registry path on the HTC Diamond:
HKEY_LOCAL_MACHINE\HARDWARE\OEM\KEYBD
there should me something like
"KeyLock"=dword:1
Or maybe another. I don't know.
http://forum.xda-developers.com/showthread.php?t=422871
very cool app to unlock and lock the phone.
Tested and works on touch pro.
I'll be replacing S2U2 with this!
nolovelust said:
hi, i can't seem to find keylock application that locks all hardware buttons but power when device is on sleep mode. have you got it on yours? i had it on my old tytn II
Click to expand...
Click to collapse
It should be in the \Windows directory:
\Windows\Keylock.lnk
\Windows\Keylock.exe
Create a shortcut in \Windows\Start Menu\Settings
I don't have this in my HD2 - any ideas if it can be installed seperately?
No idea as I have an at&t Fuze and this is a RAPH/TP/Fuze forum You might have better luck if you posted a link to this thread in the HD2 forum? Also, an alternative to s2u2, check THIS thread (QuickShutdown)
n-Joie! (Enjoy)
KeyLock
eugene7 said:
I don't have this in my HD2 - any ideas if it can be installed seperately?
Click to expand...
Click to collapse
I haven't KeyLock in my ROM by default too, but I found it on another forum after many hours searching in the Internet
Unpack it and put enywhere (in example: "Windows" or "Program Files" and run).
Greetings.

Assign lock device function to hardware button?

Hi all! Just a question, can I assign the device lock function found in the today screen to a hardware button? I'm referring to the device lock function that comes with the default windows mobile which we can choose to make it appear at the today screen. It's one of the plugin in the today screen.
i remember using this app called ae button plus. check out this link:
http://ae.inc.ru/aebplus.php
the app essentially expands the coverage and functionality of the hardware buttons. if you'll go through the list of functions, it can lock your device but it's only for wm5. i haven't tried this with wm6...though i'm not sure if an updated version has been released. i used this before when my athena was still in its original wm5 rom. but after upgrading to wm6.5, never found the use for it. secondly, didn't really use the app given that my athena, when closed, had the keyboard protecting the screen from accidental touches.
you could also try hbutton:
http://hbutton.dyndns.org/
haven't used it myself but i do know it can assign auto-screen rotation. not sure if the drop-down menu (when installed) will have screen lock on it. but essentially it works like ae button plus. and the 2 best parts of it: it works on wm6 and is freeware =)
hope that helps
Thanks! I will check it out.

Lock TP without going to Home screen + bonus question

Hi,
I have a question about the default WM lock - is it possible to lock the device but keep the application that is running shown on the screen?
I use long press of the End key to lock the TP but it jumps back to Home screen after locking.
I know Gyrator has a feature that doesn't but I'm wondering if there is a simplier way to do this. Any registry tweaks can manage it?
Thanks for the reply.
PS: (this might seem stupid) Which button is the PTT button? I can see it in the Button settings menu but I can't figure out what to push to make the particular appl to run. Thx
ferus said:
Hi,
I have a question about the default WM lock - is it possible to lock the device but keep the application that is running shown on the screen?
I use long press of the End key to lock the TP but it jumps back to Home screen after locking.
I know Gyrator has a feature that doesn't but I'm wondering if there is a simplier way to do this. Any registry tweaks can manage it?
Thanks for the reply.
PS: (this might seem stupid) Which button is the PTT button? I can see it in the Button settings menu but I can't figure out what to push to make the particular appl to run. Thx
Click to expand...
Click to collapse
So you want to be able to see the program running while your device is locked? I wouldn't know how to this because i just use the power button to put my device on standby.
BONUS!
If you look on the left side of your device, assuming you have an At&t HTC Fuze, the button under the volume up & down buttons and is marked "PTT" is the ptt button
fone_fanatic said:
So you want to be able to see the program running while your device is locked? I wouldn't know how to this because i just use the power button to put my device on standby.
BONUS!
If you look on the left side of your device, assuming you have an At&t HTC Fuze, the button under the volume up & down buttons and is marked "PTT" is the ptt button
Click to expand...
Click to collapse
Yep, exactly - I need my device locked but see the app running. But it's not the same as standby, I use my power button for that as well.
Bonus - this was indeed a stupid question I'm too embarassed to say that I own a non-branded TouchPro. That's why I couldn't find the button. Ah well, thanks for the reply.
I use AE Button Plus, and map a quick double press of the "red/hangup" button to lock screen.
I'm using the stock T-Mobile UK version of the Touch Pro (MDA Vario IV), still with TouchFlo3D enabled and this works with almost all applications, leaving the application running and on screen (but dimmed).
Hope that helps!

[APP][WIP][DEVS NEEDED] Hands Free Now [ALPHA]

HANDS FREE NOW​
Hands Free Now is an attempt to fix the bug in Google Now that Google itself never fixed.
As most of you know, as of Android 4.1+, our headsets are configured to work as follows:
1. Single press for play/pause
2. Double press for next
3. Long press for Google Now
However, the long press option does not work when the screen is off. It works only when screen is on. This is a bizarre lack of feature because if the screen is on and unlocked, you might as well click the mic on the desktop widget to launch Google Now. Why would you need the long press option anyway?!
Several attempts were made by many people to bring Googler's attention to this lack of feature, but all of em were conveniently turned down.
So I guess it's up to us to fix it.
I have started making this app but being the newbie that I am, I'm not sure if I can finish it alone. That's why I request you guys to help me out with this.
Uploaded below is the first apk
Concept in brief:
1. Launch Audio service that intercepts media KeyEvents
2. Once KeyEvents are triggered, create an empty StandOut window that blocks the entire display.
3. Wake up device, disable keyguard and launch Google Now
4. Release wakelock immediately. and reenable keyguard
5. Kill process in 10 seconds
Steps to use:
1. Install app
2. Open app from launcher once. You can go back to Home after this if you want
3. Lock screen.
4. Jack in the head set and triple press the button.
5. Device should unlock itself and in some time will launch Google Now
6. Fire your voice command and wait for response.
7. In 10 seconds, the screen will lock again.
8. For these 10 seconds, your phone will not respond to touches (this is intentional and by design, because you would not want your phone to "pocket dial" while travelling)
Release Notes:
1. App is currently incompatible with music players
2. Battery effectiveness is unknown; you might have to uninstall it once you have tested it
If you can help, the source code can be found on GitHub.
Installed app, but it wont launch after 3 presses of the button, I get a double beep sound when doing so.
I can help out with testing if you want but as far as coding goes im not very useful xD
Bluetooth too?
Will it work with Bluetooth headsets as well or only wired ones?
THANK YOU!
I registered just to say thank you, your little app allowed me to have the kind of music control I alway longed for since i passed from iPhone to Nexus 5. I'm truly grateful.:good:
I had the problem when the screen was off. After when I long press the little button on my headset. Then comes a black screen with a message: please wait (initializing) but nothing does.
But this app solve my problem!
Now I can use Google Now over my Headset.
Thank you very much! ?
Seems an old thread, but nevertheless: Thank you! Finally it works!
I'm just curious if it would be possible to change add long-press functionality. The app AutoVoice is capable of receiving a long press (also with locked screen). But it doesn't help because it relies on the not working Google Search.
Possible idea: your App could register as a service capable of receiving the VOICE_SEARCH_HANDS_FREE intent, it could receive the long press and start its procedure. It won't work immediately because Android will display the "Choose default app" prompt, that obviously doesn't work when the screen is locked/off. In order to choose the default app one has to wake the screen and manually override the keyguard/lock (for example via Secure Settings Plugin and Tasker). The override is somewhat buggy, and even though the screen is on, the phone still 'thinks' it's locked. Now: long-press to receive the command for long-press while locked, see menu and select default app. ..Hope my explanation isn't too bad.
I'm investigation another workaround to get it working with music player.
Best regards, Grtschnk

Categories

Resources