Enable Media Volume In Android Application

So you want your Android application to be able to change the media volume settings when the user presses the hard key volume buttons on the phone.

The way to do this is to make sure that your Activity class gets a reference of the audio service and override the OnKeyDown() method and catch the keypress event.

Check out the following code:

Related Posts Plugin for WordPress, Blogger...

Leave a Reply

Your email address will not be published. Required fields are marked *