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?
Your code is correct. The call returns
0
when your phone is in mute or vibration mode. Checkout your ringer mode.