tags:

views:

391

answers:

1

Some Android programs trigger the "media volume" slider when the hardware volume up/down buttons are pressed. My application seems to set the ringer volume when the hardware buttons are pressed.

How would I enable the media volume slider?

I would hate for users to have to go into their settings to change the media volume when they use my application.

+7  A: 

Just call Activity.setVolumeControlStream(AudioManager.STREAM_MUSIC) in your Activity's onCreate method.

Christopher
Awesome, that did the trick. Many thanks.
Oh Danny Boy