|
|||||||
| Register | FAQ | XDA-Portal | XDA-Wiki | Device database | Donate! | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
change's log
V1.6 2009-09-11 Phone doesnt lock if there is a call in progress V1.5 2009-08-26 1) Added an option to lock the device when a player (HTC player, WM Player, HTC FM Radio, etc) turns the screen off... V1.4 2009-08-14 1) Added command argument. "lock". this will lock the device. 2) Added a link called "Lock Now" to lock now.... 3) All the links are located in a folder called "Lock Device". (because there are 4 links and I dont want to fill the directory \windows\start menu (in your language) with many links V1.3 2009-08-04 1) Commands support. The program LockDeviceGUI.exe supports 4 commands.
V1.2 2009-08-03 1) The installer includes a little GUI program. icon.jpg With this program you can configure how LockDevice must behave. Attachment 211920 1) Enabled / Disabled 2) Work Mode: 2.1) Lock on wakeup. This is how works previous version. Pros: The program doesnt stay resident. Cons: The device must be "off" some seconds before windows really suspend the device. This time is longer with wifi active. So if you press power off and then power on quickly probably the device wont lock (because windows never suspended the device) 2.2) Lock on Screen off. Pros: The device is locked when the screen goes off so always works correctly. Cons: The program stays resident. Anyway the program is "paused" all the time so no CPU is used. the program stays sleeping until windows notifies it the screen is off. Then LockDevice lock the device and goes to sleep again ![]() Please report any bug, suggestion, etc... Dani V1.1 2009-07-31 1) The device is locked directly using keybd_event. No sendkey.exe call . So smaller, quicker and no dependence of sendkey.exe configuration. Initial post Hi Today I ve been searching for a very little program, not resident in memory to lock my device on wakeup. There are other ones but I didnt find one that isnt resident in memory. So I ve done quickly a very small program that is notified by windows when the device is woken up, so no resident, and executes \windows\endkey.exe. So if you ve configured your end key long press to lock the device then your device will be locked. I ve tested it in my Touch Pro 2 and works. I really needed it and maybe other people are in the same situation. Dani
__________________
www.commmgrpro.com Last edited by danielherrero; 11th September 2009 at 01:19 PM.. |
| Sponsored Links |
|
#2
|
||||
|
||||
|
It doesn't seem to do anything on my Touch HD. I tried turning off and on, nothing. Tried soft resetting, tried again. Nothing. I even tried running it from File Explorer on the LockDevice folder (Maybe it needs to instantiated or something), then tried turning off and on again. Nothing.
![]() EDIT: Oh ok... It doesn't work if you just turn it off then on immediately (which is a good thing). It had to be off for at least 3 seconds. Although there is a second delay before it locks after turning it on, which is ok I guess. Nonetheless, this is good stuff! Since it's the first one I've seen that is not memory resident (which makes me wonder.. how does it work??).
__________________
Everything is possible. Impossible just takes longer. Current Device: HTC Touch HD ROM: Radio: Storage: -- Previous Devices: Samsung i780 HTC Touch Dual SOLD! HTC TyTN SOLD! O2 XDA Exec Nokia 6630, 3660, 6510 and 3210 Trashed ![]() Last edited by DaVince; 30th July 2009 at 03:34 PM.. |
|
#3
|
||||
|
||||
|
Quote:
![]() Do you ve \windows\endkey.exe ? Is it configured to lock the device? If you suspend the device and quickly press the power button then the device really isnt suspended so It doesnt work. The device must be screen off several seconds (5-10) to consider itself suspended.....
__________________
www.commmgrpro.com |
|
#4
|
||||
|
||||
|
Quote:
![]() When the program starts the first time it register itself to windows to be notified when the device wakes up. So when the device wakes up Windows execute the LockDevice.exe with an argument "AppRunAfterWakeup". Then the program check if there isnt a call in progress and then execute \windows\endkey.exe. Simple ![]()
__________________
www.commmgrpro.com |
|
#5
|
||||
|
||||
|
could some people with other device than mine (tp2) to try if it works ok?
By now all works perfectly without a process spending ram/cpu ![]()
__________________
www.commmgrpro.com |
|
#6
|
||||
|
||||
|
Tried the new cab on my Touch HD (Running WM6.1). Everything works ok so far.
Thanks a lot for this! I prefer this solution since this the simplest most efficient one that makes use of the built in Lock.
__________________
Everything is possible. Impossible just takes longer. Current Device: HTC Touch HD ROM: Radio: Storage: -- Previous Devices: Samsung i780 HTC Touch Dual SOLD! HTC TyTN SOLD! O2 XDA Exec Nokia 6630, 3660, 6510 and 3210 Trashed ![]() |
|
#7
|
||||
|
||||
|
Nice. I thought about write an small resident process that monitors changes of power state to be more efficient but I prefer a process that only runs for a few ms when the device wakes up and then dies...
![]()
__________________
www.commmgrpro.com |
|
#8
|
|||
|
|||
|
awesome app dude. well done. i was wondering though, since its possible to run an app on device wake up...is there a way to call upon an app when the device is set into suspend? cause even though the device's screen isnt on, stuff is still running, so what if a reg entry like the "on device wake up" is used as a "device suspend". that would get rid of the 1 sec wait on wake up and also still not be resident. i actually dont know if there is a way to do that, i dont fully comprehend it but it was an idea. cause it would be sick to be able to get rid of the 1 sec wait.
|
|
#9
|
||||
|
||||
|
Quote:
You can, but using a resident process. The feature I used in the "wake up" process isnt avaible in that way for "before going to sleep". A process can register itself to get notifications about changes in power state (From On state to suspended state)(RequestPowerNotifications api). So you could do some stuff when the device goes to idle state (screen off) but It requires the process to stay running in memory. Really It would be "paused" waiting for a queue event but spending one of the 32 available process in WinMo. Later I will upload a little process doing that. Just for try and play ![]() Dani
__________________
www.commmgrpro.com |
|
#10
|
||||
|
||||
|
Hi
I ve uploaded in first post a more optimized version. Now the program can lock the device by itself instead of rely on call sendkey.exe. So smaller and more efficient. To avoid the 2-3 seconds needed to be suspended to make it work correctly I ve done other version that monitors the power state. It locks the device when the screen goes off (instead of when the device wakes up) but it spend one process (WinMo only can run 32 process at same time). Question of tastes... The reason about 3-4 seconds needed to wait between power off / power on is this: When you press power off, the screen goes off (power idle state) but the system needs some seconds to really be suspended. Its in this way because windows notifies drivers about the power event and they must adjust their power levels....So if you press power off and quickly power on then the device really didt was suspended so It isnt really being woken up and the program isnt called by windows ![]() Dani
__________________
www.commmgrpro.com |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|