Question

Android documentation for setStreamMute:

Mute or unmute an audio stream.

...

The mute requests for a given stream are cumulative: the AudioManager can receive several mute requests from one or more clients and the stream will be unmuted only when the same number of unmute requests are received.

...

This issue of requests being cumalative is problamatic for my implementation would there be anything wrong with setting the stream volume to 0 and then using getStreamVolume to unmute?

Was it helpful?

Solution

I'm unsure for other applications, but there did end up being a difference in my application. If you set the volume of the System Stream to 0, you end up setting the phone to vibrate as well. But if you mute the stream this side effect doesn't happen.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top