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