Possible Duplicate:
Listen to volume buttons in background service?
I really need that when hard button (VOLUME_UP) is pressed for 3 seconds it triggers actions like display a normal activity and send messages.
AFAIK, there's no such thing like listen to a button in a service. But I really need it (or something similar to it) so I'm trying to find a workaround on the internet. I've found that only some buttons (and not the one I want to use) broadcast info about their events and found something about to use a custom IME (input method editor). I'm looking for how that IME stuff works and I'm here for another (any) ideas!
Thank you all!