Android - Prevent people to change the volume
<p>How can I make as long as the app is opened, the users shouldn't be allowed to change the volume of the device?, if this is possible.  </p>

<p>I have found that you can set the volume to mute with AudioManger:  </p>

<pre><code>AudioManager volumeControl = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
volumeControl.setStreamMute(AudioManager.STREAM_MUSIC, true);
</code></pre>

<p>However this is not what I'm looking for. I want when the user enters the application to lock its current volume and does not allow to change it, while in background a melody is playing increasing the volume. (this is the reasons for why I don't want let user control the volume)</p>

<p>I was thinking if there's a possibility to override the Volume up, Volume down keys? just like we can override the Back button.</p>
