ScrollBall press events while screen is off on an Android device.

Posted by stolksdorf on Stack Overflow See other posts from Stack Overflow or by stolksdorf
Published on 2010-06-13T20:58:28Z Indexed on 2010/06/13 21:02 UTC
Read the original article Hit count: 99

Filed under:
|
|

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 Dpad_center intent, 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!

© Stack Overflow or respective owner

Related posts about android

Related posts about screen