I want to get an event to my application when someone presses the Home button:
(The silvery button with an arrow pointing left is the Home Button on the HTC Smart.)
However, when I press the button, no event at all arrives to my app. If I connect the system logger, I see that the Brew MP OS itself detects something, but it does not arrive to my app.
[CORE] CoreDaemon_HandleEvent: 111
[CORE] CoreDaemon_HandleEvent: 112
Can I register with these events so the OS passes them on to me? (Or whatever it takes to detect the home button in my app.)
I suspect the [ISHELL_RegisterNotify][2]
function may be what I am looking for, but I don't know how to use it. I tried:
ISHELL_RegisterNotify(piShell, AEECLSID_OF_MY_APP, AEECLSID_CORE, NMASK_SHELL_KEY |(NOTIFIER_VAL_ANY << 16));
That didn't work, neither this:
ISHELL_RegisterNotify(piShell, AEECLSID_OF_MY_APP, AEECLSID_CORE, ~0);
I kind of hoped that last one would get me all "core" events, but neither of those two made any difference at all.
The app will first receive an EVT_KEY
with wParam=63620 and then immediately get the EVT_APP_SUSPEND
event.
Hence, as far as I understand, the "Home Button" can not be used in any meaningful way by Brew applications for input.