SoulRayder
SoulRayder

Reputation: 5166

audioManager.getstreamVolume(AudioManager.STREAM_RING) always returning 0

I am trying to get the ring volume, but it always gives 0, regardless of what volume I have set it to (I do this by accessing it via Settings on the phone).

audioManager.getstreamVolume(AudioManager.STREAM_RING) 

The same API works properly with the other audio streams AudioManager.STREAM_NOTIFICATION, AudioManager.STREAM_MUSIC, etc. Could anyone let me know why this is happening and how I can correct it?

Upvotes: 2

Views: 2883

Answers (1)

sergej shafarenka
sergej shafarenka

Reputation: 20426

Your code is correct. The call returns 0 when your phone is in mute or vibration mode. Checkout your ringer mode.

audioManager.setRingerMode(ringerMode);

Upvotes: 2

Related Questions