views:

18

answers:

0

I'm writing a quick music player for myself on my Nexus One and really want to add the feature of being able to switch to the next song without removing it from it's case, ie. by pressing the scrollball through the sleeve.

I've scoured many resources and...

  1. Haven't found a decently easy way to listen to key press events while the screen is off.

  2. Can't seem to even get scrollball press events to work. I've tried using a broadcastreciever listening for the KeyEvent KEYCODE_DPAD_CENTER, but it doesn't seem to function properly.

I'm not looking for someone to write the code for me, but if you have successfully done either of these things, any insight on techniques or resources would be amazing.

Thanks in advance!