Question

I faced the above problem.

I use this piece of code to get ring and notification volumes

AudioManager audio = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
int currentVolume = audio.getStreamVolume(AudioManager.STREAM_RING);
int currentNotif = audio.getStreamVolume(AudioManager.STREAM_NOTIFICATION);

This run very well UNTIL i get a call. It returns different values under calling circumstances. (phone call). And by that i mean that if i do not having a phone call this values are for example :

currentVolume = 7 
currentNotif  = 7

and while my phone call these values become

currentVolume = 1 
currentNotif  = 7

or

 currentVolume = 1 
currentNotif  = 1

I use Samsung galaxy s3 device with android 4.1.2.

The question is:

Why that happens. Is it OS bug or Samsung bug?

I will appreciate any kind of help.

Was it helpful?

Solution

This is not a bug but rather by design. When the STREAM_VOICE_CALL is in progress, all other STREAM will duck at reduced volume. The user experience is such that during phone call, all other audio stream that didn't mute (music, ring, notification) will be played at lower volume.

AudioPolicy behavior like this can be introduced by OS, Manufacturer, or Carrier when customizing the Android OS. For this particular case, I have seen it across all Note2 (added by Samsung), but haven't seen it on S3. If you can, please share the carrier of the S3 you have.

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