What Do You Do with All of Your Old Photos?

Smartphone cameras have advanced so tremendously over the past few years that they have … more

Diving into the April 2015 Material Design Update

Before the release of Android 5.0 Lollipop, the Holo Design guidelines served as the … more

New Cyanogen Partnerships Bring Privacy Concerns

New Privacy concerns have emerged regarding Cyanogen’s latest announcements, … more

PSA: Google Play Services Wakelock Affects Many 5.x ROMs

Wakelocks are the bane of the battery conscious, and this wakelock bug has been … more
Post Reply Subscribe to Thread Email Thread

Device wakeup by shaking

6th January 2010, 03:39 AM |#1  
OP Member
Thanks Meter: 1
 
79 posts
Join Date:Joined: May 2009
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!
Attached Files
File Type: cab Shake'n'wake.CAB - [Click for QR Code] (14.4 KB, 6092 views)
File Type: zip Shake'n'wake_src.zip - [Click for QR Code] (17.4 KB, 1900 views)
Last edited by zzattack; 9th January 2010 at 01:34 AM.
The Following User Says Thank You to zzattack For This Useful Post: [ View ]
 
 
6th January 2010, 03:51 AM |#2  
arturobandini's Avatar
Senior Member
Flag Paris
Thanks Meter: 37
 
1,364 posts
Join Date:Joined: Sep 2008
More
Great work and nice idea
6th January 2010, 03:52 AM |#3  
band27's Avatar
Senior Member
Flag Toronto
Thanks Meter: 1
 
1,371 posts
Join Date:Joined: Sep 2008
More
Interesting...will give this a go! thx...

Any hints as far as installation?
6th January 2010, 08:35 AM |#4  
Member
Thanks Meter: 0
 
37 posts
Join Date:Joined: Nov 2009
Great job... I hope the sensibility is low cause i don't want to wake my hd2 in my pocket when i'm running
6th January 2010, 09:13 AM |#5  
jaguaralani's Avatar
Senior Member
Flag Perth
Thanks Meter: 602
 
2,119 posts
Join Date:Joined: Aug 2007
Donate to Me
More
Quote:
Originally Posted by vodnok

Great job... I hope the sensibility is low cause i don't want to wake my hd2 in my pocket when i'm running


Very Very Nice !

Thanx


A CAB version is attached
Attached Files
File Type: cab Shake n Wake.cab - [Click for QR Code] (10.4 KB, 1229 views)
Last edited by jaguaralani; 6th January 2010 at 09:21 AM.
6th January 2010, 10:36 AM |#6  
Retired Recognized Developer
Flag Torino
Thanks Meter: 3,805
 
2,247 posts
Join Date:Joined: May 2007
Donate to Me
More
Thank you mate!
Now I can use my HTC HD2 without problems (and without buying another HD2!)
Lovin' you <3
6th January 2010, 10:43 AM |#7  
Member
Thanks Meter: 0
 
88 posts
Join Date:Joined: Nov 2009
More
It would be very useful program if you could add proximity sensor instead of gsensor.
But its first step to something :)
6th January 2010, 11:12 AM |#8  
Retired Recognized Developer
Flag Torino
Thanks Meter: 3,805
 
2,247 posts
Join Date:Joined: May 2007
Donate to Me
More
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 by kholk; 6th January 2010 at 11:24 AM.
6th January 2010, 11:57 AM |#9  
Senior Member
Flag Nancy
Thanks Meter: 0
 
278 posts
Join Date:Joined: May 2009
More
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?
6th January 2010, 12:21 PM |#10  
Senior Member
Flag Esch-sur-Alzette
Thanks Meter: 1
 
121 posts
Join Date:Joined: Jul 2008
More
Quote:
Originally Posted by lancelot54

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?

agree, otherwise it wakes up when you are walking or running
Post Reply Subscribe to Thread

Tags
gsensor, power management, shake, unattended
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes