Thursday, May 5, 2011

Headset Monitoring / Button Overrides

In 0.13 I added two new features: Headset Plug Monitoring and Button Overrides.

Headset Plug Monitoring
With this option enabled, gmmp will automatically pause playback if you unplug your headset.  Doing this will trigger gmmp to listen for you to plug the headset back in and automatically start playback again.  This is the only case when the playback is automatically controlled.  If playback was already stopped/paused when you unplug, nothing will happen.  I coded it this way because I always hated when other apps would auto launch when I plugged my headset in, even tho I haven't used them in a day or two.

Button Overrides
This second option lets you use the volume buttons to advance the current track playing or go back to a previous track.  The overrides only take effect if you have music playing, otherwise they will change the volume.  Also due to the way the android OS is set up, the buttons cannot be overridden with the screen off, nor can it capture the key presses if gmmp is not in focus.  I also added an option to use the power button for play/pause, but that only seems to work in the emulator.  It does nothing on my archos nor my thunderbolt.  I'm leaving it in for the time being, but will probably remove it if its not useful to anyone

Edit: Power override option removed in 0.26