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?
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?