Device wakeup by shaking

Search This thread

zzattack

Senior Member
May 24, 2009
107
15
Kholk mentioned his HD2's hardware buttons didn't work, and we looked into the possibility of waking the device by shaking it. This utility creates a message queue and monitors power notifications. When the device is suspended, this application is put in unattended mode allowing it to continue running. Also the GSensor is requested to stay awake so it can remain to be polled. A few hours of coding resulted in the attached application. Credits go to mligor for this port and OpenNETCF for a good example of creating a message queue in managed code.
The application has no user interface, just start it, suspend ur device by hitting the power button, and shake it to see if it turns on. I don't know the exact impact of this on the battery drain, so I would suggest killing the process or performing a softreset after you've seen the show ;D


Update (06-01-2010): I've added a native version, I think this will perform a little better. It could also be a bit easier on battery drain. Source code also attached.
Update (07-01-2010): added my own installer (with start menu shortcut, source code left out, and updated program). Soft-reset before installing this. This version also prevents multiple instances of the program to be running, causing only extra battery drain.
Update (09-01-2010): fixed two bugs, should now be stable!
 

Attachments

  • Shake'n'wake.CAB
    14.4 KB · Views: 6,169
  • Shake'n'wake_src.zip
    17.4 KB · Views: 1,969
Last edited:
  • Like
Reactions: Marvlesz

vodnok

Member
Nov 23, 2009
38
0
Great job... I hope the sensibility is low cause i don't want to wake my hd2 in my pocket when i'm running
 

kholk

Retired Recognized Developer
May 20, 2007
2,293
3,829
Torino
Thank you mate!
Now I can use my HTC HD2 without problems (and without buying another HD2!)
Lovin' you <3
 

str0g

Senior Member
Nov 23, 2009
88
0
It would be very useful program if you could add proximity sensor instead of gsensor.
But its first step to something :)
 

kholk

Retired Recognized Developer
May 20, 2007
2,293
3,829
Torino
Unfortunately for me, it works for the first two wakes, then it stops working.
Anyone experienced the same issue?

EDIT: Strange. Now it works ^^
 
Last edited:

lancelot54

Senior Member
May 23, 2009
278
0
Nancy
It's would be better to add proximity sensor. Keep the shake to wake up, but add proximity sensor. This way, if the phone is shaked, but in the pocket, he will not wake up :) Take the both for more efficacity :) isn't?
 

Cluster_

Member
Sep 30, 2007
23
0
Hi there,

are you able to add a function shake to lock like the bug in hdwobble?

Shake2Lock&Shake2Unlock would be a nice thing.

THX

Tom
 

zzattack

Senior Member
May 24, 2009
107
15
Hi there,
are you able to add a function shake to lock like the bug in hdwobble?

Shake2Lock&Shake2Unlock would be a nice thing.

THX
Tom
I'm not aware of hdwobble and without extensive configuration options for this program I don't see how this would be a useful feature. This was mainly a proof of concept and the native version was a simple exercise for me as I hadn't written a native app for winmo before, so I don't really have plans to extend it further. Source code is provided for those who are interested in adding features or changing stuff such as sensitivity etc. or adding a GUI but I wasn't planning on doing so. If I update this code again it will only be a commented version of the current source. Sorry.
 

JPW

Senior Member
Dec 9, 2006
144
0
Working nicely on the HD - Blackstone
rom : topix 3.0.2 sence weather 2.1
updated rilphone for location
moved - exe file into accesories folder to keep start menu tidy>>

jpw
 

daasguy

Senior Member
Nov 12, 2009
178
10
for topaz?

ok there are a lot of files which file do i put n where?

i used the cab first it didnt work
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Kholk mentioned his HD2's hardware buttons didn't work, and we looked into the possibility of waking the device by shaking it. This utility creates a message queue and monitors power notifications. When the device is suspended, this application is put in unattended mode allowing it to continue running. Also the GSensor is requested to stay awake so it can remain to be polled. A few hours of coding resulted in the attached application. Credits go to mligor for this port and OpenNETCF for a good example of creating a message queue in managed code.
    The application has no user interface, just start it, suspend ur device by hitting the power button, and shake it to see if it turns on. I don't know the exact impact of this on the battery drain, so I would suggest killing the process or performing a softreset after you've seen the show ;D


    Update (06-01-2010): I've added a native version, I think this will perform a little better. It could also be a bit easier on battery drain. Source code also attached.
    Update (07-01-2010): added my own installer (with start menu shortcut, source code left out, and updated program). Soft-reset before installing this. This version also prevents multiple instances of the program to be running, causing only extra battery drain.
    Update (09-01-2010): fixed two bugs, should now be stable!