Code example for AudioManager

Methods: adjustStreamVolume

0
			case KeyEvent.KEYCODE_VOLUME_DOWN:
				AudioManager audio = (AudioManager)mParent.getSystemService(mParent.AUDIO_SERVICE);
				audio.adjustStreamVolume(AudioManager.STREAM_MUSIC,
						keyCode == KeyEvent.KEYCODE_VOLUME_UP ? AudioManager.ADJUST_RAISE : AudioManager.ADJUST_LOWER,
						AudioManager.FLAG_SHOW_UI);
				return true; 
			default: 
				nativeKey(keyCode, 0);
				return true; 
		} 
	} 
 
	DemoRenderer mRenderer;
	MainActivity mParent;
	DifferentTouchInput touchInput = null;
 
	public static native void nativeMouse( int x, int y, int action, int pointerId, int pressure, int radius );
	public static native void nativeKey( int keyCode, int down );
	public static native void initJavaCallbacks(); 
 
}