One of the most significant differences is volume control.
As stated in, we can set the volume level or adjust the volume for each stream, respectively.
And we can control the โFocus of soundโ so that other applications stop playing or lowering volumes, so that we can clearly reproduce sound on a specific stream, or the sound will not be blocked by other high-priority sound, such as a phone ring, voice feedback from navigation or whatever something like that.
With several applications that potentially play audio, it's important to think about how they should interact. To avoid the simultaneous use of any music application, Android uses audio focus for moderate sound reproduction. Applications that perform audio focus must play audio.
Another non-interference is which sound device will produce the sound.
Using STREAM_MUSIC, the sound will be played through one audio device (phone speaker, earphone, bluetooth speaker or something else) connected to the phone.
Using STREAM_RING, sound will be played through all audio devices connected to the phone. This behavior may vary for each device.
source share