Friday, August 24, 2012

How to implement the volume control of your Android application with the device volume controls

If you want to control your application volume on Android with the device volume controls (keys, buttons, etc) just put this line of code to onCreate method in your class that extends Activity:

setVolumeControlStream(AudioManager.STREAM_MUSIC);

Read more about this feature on this link http://stackoverflow.com/a/674207

No comments: