Hardware button On/Off - Windows Mobile Development and Hacking General

Is it possible to know when a user presses the on /Off button.
I can controll the others buttons, but not this one.
I want to know when the user turn on the device so that I can start my program. And stop my program when the user turn off the device..
/Ove

there is a function called 'RequestPowerNotifications'

Hi,
You can use code:
Use the notification-database and events
NOTIFICATION_EVENT_WAKEUP = 11
Or try WakeApp:
http://www.kent7.com/holly/wakeapp/
(There is an English version available!)
Sam

oveboh said:
I can controll the others buttons, but not this one.
Click to expand...
Click to collapse
Sorry Ove, cannot help there. But I am desperately after a tool that redirects the volume up and down buttons to MS Reader usagable page up and page down... Anyone would make a tool like that?

Related

Jas-Jar Light Button

Any ideas on how to get the light button working on a jas-jar. Mine has not been working since the start and I've tried everything. The button Im talking about is the first from the right close to the infrared port on the outside of the device. It is supposed to turn on the flashlight but when I press it nothing happens and it doesnt even show up in the buttons applet in WM5.
Actually that button doesn't turn on the flashlight, though some here have tried to come up with a hack so that it would. I don't know if they were ever successful with that.
That button turns on the screen backlight when it has timed out but your device is still turned on. It's not the most useful button, which is why folks were trying to come up with a hack to make it more useful, for instance to turn on the flashlight like you wanted to.
Maybe if someone has had success, they will chime in here.
Change the button
Attached is a cab file allowing you to make use out of the light button to anything else :lol:
When yuo say anything else, does that include controlling the flashlight? Either way, thanks for the file.
Would be nice if one could assign it to turn on the keyboard backlight.
There is no option to adjust the sensitivite of the light sensor for the keyboard, and i think that it kicks in way to late.
Find my self holding the finger over the sensor and hitting a button to make it light up.
Any one aware og a possible Reg Hack to make this option appear in the Assing Button list?
Melty said:
When yuo say anything else, does that include controlling the flashlight? Either way, thanks for the file.
Click to expand...
Click to collapse
I meant anything else with use, flushlight & the keyboard light do not have exe files in the buttons map menu :wink:
taiseer999 said:
& the keyboard light do not have exe files in the buttons map menu :wink:
Click to expand...
Click to collapse
Nope i know that :wink: thats why i'm asking if anybody knows of a hack or the whereabouts of such an exe file..... Any ideas??
why dont u just change the option in the settings\buttons\backlight and take the tick off the box, and it works like a charm. everytime u press a key it lights up, sorted, and it doesnt affect the battery at all really
@Elmo
Well i didn't use that choise because i don't have any car charger yet. (Waiting for the Brodit kit)
I want to preserve as much battery as possible.........as you already know, this baby can eat your battery pretty fast............
Re: Change the button
taiseer999 said:
Attached is a cab file allowing you to make use out of the light button to anything else :lol:
Click to expand...
Click to collapse
Is this the same as changing it manually on the registry?
Yes, it's my CAB file I posted a little while back that adds a registry entry so that you see it listed as "Button 5" in the Buttons setting applet.
elmo said:
why dont u just change the option in the settings\buttons\backlight and take the tick off the box, and it works like a charm. everytime u press a key it lights up, sorted, and it doesnt affect the battery at all really
Click to expand...
Click to collapse
God, didn't know it was that easy... cheers!
Anyone any idea how badly this affects battery life?
Re: Change the button
taiseer999 said:
Attached is a cab file allowing you to make use out of the light button to anything else :lol:
Click to expand...
Click to collapse
Isn'it available for the Wizard too ? ...
I wrote a very simple script that turn on the camera and press the flash button.
I use the flash key and ms voice command to start it
you need to have MortScript installed. (include with this package)
A very simple question from a new owner -- where are the buttons defined that are assigned in Settings - Buttons? I don't see them labeled as "Button 1", etc in the User Manual.
davidinnz said:
A very simple question from a new owner -- where are the buttons defined that are assigned in Settings - Buttons? I don't see them labeled as "Button 1", etc in the User Manual.
Click to expand...
Click to collapse
On your HTC Universal, go to:
Start>Settings>Buttons
From there you can change the assignments of the buttons.
Ok. I have found the 2 keyboard keys that are buttons 1 and 2, and the 2 external buttons that are buttons 3 and 4.
I must say that button 1 is not very useful for voice command, when the device is closed. I guess I could assign it to button 4 or button 5 with the registry hack.
On the supplied "headset", there is a microphone with a button on it.
- What does that button do?
- Is it possible to use it for Voice Command?
(I guess for that to happen, it first needs to be recognised as an assignable button in WM5).
The backlight button cab file is working. Now I can reassign that useless button becomes the OK button. Very useful when use it in the tablet mode. But I need two more buttons to use for the softkey. I have use the record button for the left softkey and have no more button for the right softkey. Any suggestion?
One more thing, the script for enabling the flash light does not work. It turns on the camera, but the flash light remains off.

Media Player continuing to stream when device is 'off'

Hi all,
I use the BT A2DP profile to stream music through the media player and one of the 'features' that differs from the K-JAM (wizard) and is lacking in the TyTN is the ability to continue that stream even when the device is 'off' (useful for saving battery, switching off the buttons, etc.). With the TyTN whenever the device is turned off the stream also ceases. Does anybody know if there is someway of ensuring that the media player is not switched off along with the device (I'm guessing a registry setting or similar).
All help very welcome.
Cheers
I was wondering this also. My wizard was able to be "off" and still stream. ANyone got any brigjt ideas?
Later, Lew
Have you tried just turning the screen off? PocketPlus has a utility called "Screen Toggle," which does just that.
When used in conjunction with the Button Lock (leaving only the power button active), you just might be able to solve your issue...
goestoeleven said:
Have you tried just turning the screen off? PocketPlus has a utility called "Screen Toggle," which does just that.
When used in conjunction with the Button Lock (leaving only the power button active), you just might be able to solve your issue...
Click to expand...
Click to collapse
Yeah...what he said!
That what I do.
I really miss this feature to.
So there is no way to do it on the Hermes?
Its not particulary elegent to have to perform multiple steps to turn the screen off. it was much eaiser just to hit the off button and listen away...
I'm using VjDeviceLock wich is what you want, I think.
After you've installed it you should create a new shortcut in c:/windows/startmenu/programs/vijay555/vjdevicelock. You can copy an exiting one in this directory and edit the parameter. What you want is "-displayoff". I bound this to my Videocall-Button, cause I don't use video telephony.
If I listen to music I just have to press my Videocall-Button and VjDeviceLock turns off my screen and locks all Buttons except the power on/off one.
Also VjDeviceLock is just great to save money
If you get a sms or a call the device turns on itself. I once didn't notice this and called a random person out of my adressbook, because I had my trion in my pocket and were moving all the evening and somehow started a call.
This cannot happen again, because I started vjdevicelock with parameter "-install". Now everytime my trion turns on itself it gets automatically (re)locked.
thats a fantastic solution and it works really well!
what program are you using to remap the buttons?
Hi,
Does anyone else suffers strange key problems when using VJdevicelock;
After using -displayoff or -displaytoggle and resume back to normal, phone buttons (call/disconnect,videotalk) doesnt work anymore, it need to be softreseted before the buttos work again?
-Kha
EDIT:
just found out that when resuming from -displayoff, after pressing windows and ok softkeys, dialbuttos work again!
I'd appreciate if somebody here could advice me on how to map VjDeviceLock to VideoCall button on my TyTN (I have original TyTN ROM and the VideoCall key is functional ). I couldn't remap it using Buttons configuration utility in Settings.
as I said you have to create a Shortcut in your Startmenu. Shortcuts in Startmenu are shown as available possibilities in Start - Settings - Buttons (Perhaps it's called a bit different. I'm using a german version where it's called 'Tasten')
This is how I remapped it. I don't use a special program.
I use the device lock on today plugins.
S.K.
silent_killa said:
I use the device lock on today plugins.
S.K.
Click to expand...
Click to collapse
This does not turn off your screen AND your device is sometimes getting unlocked when you receive calls or sms.
Remapping VideCall button
sn00x said:
as I said you have to create a Shortcut in your Startmenu. Shortcuts in Startmenu are shown as available possibilities in Start - Settings - Buttons (Perhaps it's called a bit different. I'm using a german version where it's called 'Tasten')
This is how I remapped it. I don't use a special program.
Click to expand...
Click to collapse
Thank you very much for your instant response. I did all you mentioned in your message and I remapped the VideoCall button (is it the Button between Buttons 4 and 5 ? ) but pressing it still doesn't activate VJDevice. Any other suggestions?
Is the device locked when you click on the shortcut?
If not: edit an existing shortcut, let's say "VJDeviceLock About.lnk". Make it point to: \Programms\vjay555\VJDeviceLock\VJDeviceLock.exe" -displayoff
It is right that there is only one "
When I open my shortcut in a text editor the content is:
Code:
64#"\Programme\vijay555\VJDeviceLock\VJDeviceLock.exe" -displayoff"
Yes. The device locks when I click on the shortcut itself but when I press VideoCall button, to which I had previously mapped the link, the Dialpad pops up.
sn00x said:
I'm using VjDeviceLock wich is what you want, I think.
After you've installed it you should create a new shortcut in c:/windows/startmenu/programs/vijay555/vjdevicelock. You can copy an exiting one in this directory and edit the parameter. What you want is "-displayoff". I bound this to my Videocall-Button, cause I don't use video telephony.
Click to expand...
Click to collapse
How can you do this? Are you using a third party app? I see no way to bind anything other than 5 buttons on my device...
I bound it to "Button 5".

Mapping Power button

Hi peeps !
Searched all over the forum, but couldn't find the answer.
Is there a way to assign a function to the Power On/Off button other than to turn the Athena on / off ?
I typically, for instance, would like to bind the "DisplaySwitch" psShutXP shortcut to the Power Button so that when i press it, it doesn't turn the Athena off but only the screen.
Additionnaly, if one knows how to assign a sequence of actions to the Power Button (like "locking the device + switching screen on / off"), that'd be great.
Thanks guys !
Turning off only the screen is the default action for the power button...
There is an app that many on here use (I can't think of the name) which lets you reassign most of the buttons on the Athena, including the OK and Windows button, to many different functions. You can also hack the registry to reassign the camera/comm/browser buttons if the standard reassignments that Windows Mobile gives you aren't enough - but really odd things like locking + screen off may require you to also write your own small app first.
Hi there, thank you for your answer.
Actually, the Power button must do something more than just flicking the screen off, like scaling the CPU down, spinning out the microdrive, flushing a bunch of buffers, etc.
I'm asking because of a problem I posted about in the forum (here: http://forum.xda-developers.com/showthread.php?t=353456), about my Athena being strangely slow, and its CPU being 80% used by nothing that I can see or find, when I wake it up using the Power button.
I'm trying to see if I can circumvent the problem if I can't manage to find its source and solve it, in fact.
I used AEButtons Plus, which works pretty well with ALL buttons but the Power one, and I couldn't find a reference to it in the registry either.
Thanks for your time !
Yup, that's the app I was thinking of. I don't use it so I couldn't think of the name. Sorry to hear of your slowdown problems, I've been monitoring that thread. I agree that it sounds like a hardware problem at this point.
You need DevieLock.cab. It can be set to switch off the screen and lock the device. It can by mapped to any button but Power on/off though.
Thanks man, gonna look it up right away !

Need dev help with reading volume up/down keys

Hi !
I'm writing an app (which i will post here for free ofc) and i'm trying to read the volume up/down keys. I also need to stop them from displaying the volume slider and changing volume while my app is running, i.e. inhibit default behaviour. And since my app will run in the background i want the rest of the keys to function as normal.
If you can help, please post here.
I would really like concise answers, not something like : "try to hook the keyboard driver and see what you get".
Don't ask what my app will do, i won't tell until it's ready (a beta will be available as soon as i can read the keys, i got the rest of it ready).
Thanks,
RPG
Sorry I will give you a "try to hook the keyboard driver and see what you get" like answer ;-) but did you get that keys were hardware specific ?
Sometimes those keys are mapped to Up and Down.
I have no problem in asking the user: press volume up key, press volume down key, so that it works on any machine (or maybe he wants to use different keys). The problem is that GetASyncKeyState for example has no idea those keys are pressed. And even when it works for some other keys (GetAsyncKeyState reads them), those keys still go to the system and stuff happens (like i said, i want to inhibit default behaviour).
Don't post if you don't know what GetASyncKeyState does
RPG0 said:
I have no problem in asking the user: press volume up key, press volume down key, so that it works on any machine (or maybe he wants to use different keys). The problem is that GetASyncKeyState for example has no idea those keys are pressed. And even when it works for some other keys (GetAsyncKeyState reads them), those keys still go to the system and stuff happens (like i said, i want to inhibit default behaviour).
Don't post if you don't know what GetASyncKeyState does
Click to expand...
Click to collapse
I'm guessing C++, which I have no knowledge in, however, briefly looking at the MSDN article on GetASyncKeyState, I'd guess the list on vijay555s site for VJKeyPress uses the same key codes...
So,
Code:
VK_VOLUME_DOWN 174
VK_VOLUME_UP 173
from here
l3v5y said:
I'm guessing C++, which I have no knowledge in, however, briefly looking at the MSDN article on GetASyncKeyState, I'd guess the list on vijay555s site for VJKeyPress uses the same key codes...
So,
Code:
VK_VOLUME_DOWN 174
VK_VOLUME_UP 173
from here
Click to expand...
Click to collapse
Like i said, i already tried that. Doesn't work.
RPG0 said:
Like i said, i already tried that. Doesn't work.
Click to expand...
Click to collapse
Then, I'm sorry, but I'm clueless
bump !
I'm really close, i just need the way to read the keys
RPG0 said:
bump !
I'm really close, i just need the way to read the keys
Click to expand...
Click to collapse
Do you need them within your program, or to be redirected to your program (as in, the volume keys open your program)? In the Diamond volume control app, there are some reg keys for opening that program rather than the WM volume control applet...
I need them in my program.
Right now i do have them redirected to run my prog, for tests, but it's not the way i want it.
What i do need is a way to know in my prog when that key is pressed and when it is released. Again, my app will run in the background, so i need the rest of the keys untouched.

Turn off side buttons

Hi guys, I'm having troubles with one of the functions of the volume buttons on the side of the phone. When the phone is locked and someone rings me when I press either up or down I put the phone in silent - I want this thing off, it is pretty easy to accidently press it and miss a call - I did it a lot! Any help, please?
hakc said:
Hi guys, I'm having troubles with one of the functions of the volume buttons on the side of the phone. When the phone is locked and someone rings me when I press either up or down I put the phone in silent - I want this thing off, it is pretty easy to accidently press it and miss a call - I did it a lot! Any help, please?
Click to expand...
Click to collapse
Take this one "AE Button Plus" : http://ae.inc.ru/aebplus.php
Regards
cimber
Thanks, mate! Is this program confirmed to work on touch2? I've read somewhere that it can mess all of my buttons if it is not designed for my device or something like that.
EDIT: Okay it works, but is there any app or registry that can allow me to turn off only the function "Mute" when someone is ringing? This things shuts down the buttons completely and I don't have a volume control when I'm in the windows
hakc said:
Thanks, mate! Is this program confirmed to work on touch2? I've read somewhere that it can mess all of my buttons if it is not designed for my device or something like that.
EDIT: Okay it works, but is there any app or registry that can allow me to turn off only the function "Mute" when someone is ringing? This things shuts down the buttons completely and I don't have a volume control when I'm in the windows
Click to expand...
Click to collapse
It works on my Touch2 perfectly !
Just a hint, I have only disabled the "volume-up" button. If you press "volume-down" first, then "volume-up" works as usual !
Regards
cimber
hello,
I have a very similar problem (using Touch2, T-Mobile, German version), although in may case the Volume Up button seems to dismiss the call (the caller is rerouted to my mailbox).
What I want is: simply deactivate the Volume Up button when the device is locked.
I read much about AE Buttons Plus, however I also read much about this app using up battery, and I don't want that. I really ONLY need this single feature, so I don't want to use a bloated app which cooks coffee, washes my cloths and so on... you know what I mean.
Anyone knows how I could do that? Is there a reg key or a tiny app just for this?
Or can anyone at least tell me how I can use AE Buttons Plus without the battery draining?
cheers,
Saiba

Categories

Resources