Code example for AudioManager

Methods: adjustStreamVolumegetStreamVolume

0
	/** 
	 * Decrease the alarm audio streams volume one step (if volume greater than 
	 * the VOLUME_MIN_LIMIT). 
	 */ 
	public void decreaseVolume() { 
		if (audioManager.getStreamVolume(AudioManager.STREAM_ALARM) > VOLUME_MIN_LIMIT) {
			audioManager.adjustStreamVolume(AudioManager.STREAM_ALARM,
					AudioManager.ADJUST_LOWER, 0);
		} 
	} 
 
	/** 
	 * Sets the volume for the alarm audio stream to the desired level. 
	 *  
	 * @param desiredVol 
	 *            An integer between VOLUME_MIN_LIMIT and VOLUME_MAX_LIMIT 
	 */ 
	public void setVolume(int desiredVol) {
		int newVolume = desiredVol;
		if (desiredVol > VOLUME_MAX_LIMIT) {