PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Program closes faster than user releases hardware button

In onKeyDown() I check for pressing some of hardware buttons and make shutdown() call when it was pressed.

But hardware buttons bindings restore very fast and with my program exit another program imidiately starts (Calendar, Contacts, etc ). So I have to call sleep() system function to pause for a while, because program exits faster then user released hardware button.

I don't know how to call it. It is not a bug of course. But some information for your consideration.
Hi Nomad,
Perhaps you could do the shutdown() call inside the onKeyUp() event handler, instead of onKeyDown().
Anyway, we are going to try to provide a solution for this. If it's not inside the GledPlay lib itself, we may at least document this behavior.

Thank you,
Sergio.