Chainfire Turns Your Bootanimation into a Logging Center

Having a nice boot animation certainly adds a little bit of aesthetic polish to your … more

Android TV Launcher Pushed to Google Play

Over the past decade, the tech universe has seen two drastic and widely contrasting changes with … more

Cyngn, OnePlus, Micromax – The Legal Battle

Recently, a battle has been waging in India over the rights to distribute the commercial … more

Lean Mean Battery Power Saving App Review

We talk a lot about battery topics here at XDA TV. We talk about everything from Power Banks to USB … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Device wakeup by shaking

OP zzattack

6th January 2010, 04: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, 6086 views)
File Type: zip Shake'n'wake_src.zip - [Click for QR Code] (17.4 KB, 1894 views)
Last edited by zzattack; 9th January 2010 at 02:34 AM.
The Following User Says Thank You to zzattack For This Useful Post: [ View ]
6th January 2010, 04: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, 04: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, 09: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, 10:13 AM   |  #5  
jaguaralani's Avatar
Senior Member
Flag Perth
Thanks Meter: 590
 
2,089 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, 1227 views)
Last edited by jaguaralani; 6th January 2010 at 10:21 AM.
6th January 2010, 11:36 AM   |  #6  
Recognized Developer
Flag Torino
Thanks Meter: 3,804
 
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, 11: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, 12:12 PM   |  #8  
Recognized Developer
Flag Torino
Thanks Meter: 3,804
 
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 12:24 PM.
6th January 2010, 12:57 PM   |  #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, 01: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