Search code examples
androidmediavolumeaudiotrack

Android Play Sound even if Media Volume is 0


I want to play music with AudioTrack even if the media volume of the device is 0. In my app, I want to have a SeekBar for the media volume (maybe if other music runs in the background) and one other SeekBar for the music of my app.

Until now, I can change the media volume. But then the music of my app is also silent..

How can I do that?


Solution

  • Thanks for your answers.

    Now I use "AudioTrack(AudioManager.STREAM_SYSTEM, (...))" and it's working good. Maybe it's not the best method but by now, it's working.