So on my 2.3 devices, I can play a sound with SoundPool or MediaPlayer at full volume, even if the device volume is set to 0/mute. It was my understanding that you had to manually get the device level and set it when you played back a sound.
This is how I want the behavior to work.
However, I now notice on my 4.0 device, that the sounds are automatically played at the device's set level, which I do not want!
Is this a difference between versions of the OS? If so, is there a way to ignore the devices volume? So even if it is muted, I can play a sound and have it be heard?
I can't go into why I need this feature, but I really really do.
Thanks!
Best Answer
I had a similar need for an alarm clock application. Here is the relevant code with comments regarding the volume.
This works on my HTC Rezound Android Version 4.0.3 when the sound profile is set to silent, when the alarm stream volume is manually set to zero and when the ringtone volume is set to zero.