New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
oveboh
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 1
Join Date: Mar 2004
Default Hardware button On/Off

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
 
itsme
Old
#2  
Developer / Recognized Developer
Thanks Meter 3
Posts: 652
Join Date: Mar 2003
Location: delft 52'00N 4'22E
there is a function called 'RequestPowerNotifications'
 
samvds
Old
#3  
Senior Member
Thanks Meter 0
Posts: 147
Join Date: Feb 2004
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
TyTN II / Kingston 2 GB Mico-SD
http://www.LinXIT.be
 
farnold
Old
#4  
Senior Member
Thanks Meter 1
Posts: 155
Join Date: Dec 2003
Location: Singapore
Default Re: Hardware button On/Off

Quote:
Originally Posted by oveboh
I can controll the others buttons, but not this one.
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?
Cheers
Frank