My apps playing two audio, first from service and second from activity. I want to decrease the volume of first audio when second audio is playing. After stop the second audio, the volume of first audio should be increases.
MediaPlayer has methods for that. It sets volume for left and right channel. Unmuted:
mediaPlayerA.setVolume(1.0f, 1.0f);
mute the other player
mediaPlayerB.setVolume(0.0f, 0.0f);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With