My app plays sounds, but the volume buttons only seem to work if the sound is playing. Otherwise if you hit the volume buttons they change the ringer volume instead of the media volume. How can I make it so that while the app is running, hitting the volume buttons always change the media volume? Or is this considered bad practice?
Asked
Active
Viewed 84 times
1 Answers
1
Call this within your activities onCreate().
setVolumeControlStream (AudioManager.STREAM_MUSIC);

VishalKale
- 758
- 7
- 22