View Full Version : Nexus S solution for missing trackball (music skip)

07-11-2011, 09:04 AM
Hello all... looking for development ideas / possible solutions for music skip function while phone it turned off in my pocket.

Please read to understand what I'm thinking ;-)

I'm looking for anyone with suggestions to a small problem of mine...

I recently upgraded? to the Nexus S from the Nexus One. My problem is that I use the phone a lot for Music and I was using a custom 2.3.4 ROM that implemented track ball music skip functions on the Nexus One and I really miss them on the Nexus S a lot !

I have the CyanogenMod volume control music skip implemented but I find that when the phone is in my pocket and I try and find the volume controls, I end up pressing the power button accidentally on the opposite side at the same time thus turning on the screen and canceling the music skip functions. I end up fighting with my Nexus S to skip the the next music track or I just end up changing the music volume instead.


I would like to implement a Tap to Skip function... so when the phone is off and in my pocket I can just tap it two or three times to skip the track.

My plan was to implement the skip function in the PhoneWindowManager and use OnGestureListener for taps...but I guess this is not going to work when the screen is off ??? so the other option is using the Accelerometer to detect the taps but I don't have much of a clue how to do that.

Does anyone have any ideas?

Thank you

11-06-2011, 03:21 AM
The problem with those implementations is how you'd differentiate between legitimate taps vs. bumping your phone screen onto your leg (or acceleration due to the bumps while you walk). Given that your phone is in a position where it is difficult for you to identify the power button from the volume rocker, it sounds like it's out of sight in your pocket. If you can differentiate between intentional presses and accidental presses, THEN think of how the code will actually be made to implement that.