PDA

View Full Version : Handling Wake-Up Event


WJames
3rd January 2008, 03:52 PM
Greetings.

I want to write an application that traps a wake-up event, determines if the event was triggered by pressing the power button, and if not, puts the phone back into sleep mode. Basically, I want to prevent an incoming call from activating my phone. I want to be able to answer the phone with my Bluetooth headset and not worry about accidentally pressing the hang up button while I walk around with my phone in its case. This has happened a few too many times. :(

I see some comments about invoking CeRunAppAtEvent with a NOTIFICATION_EVENT_WAKEUP flag. However, this appears to take place too late. I feel like I need to write something near the kernel level so I can also determine if the power button was pressed.

Anyone experienced with handling such events?

RStein
3rd January 2008, 08:03 PM
Try TAPI for detecting incomming call or handle call in RIL.

Jussi77
3rd January 2008, 10:38 PM
I wrote simple autolock program for this purpose,
see http://mobilitytoday.com/forum/showthread.php?t=13662