AudioManager adjustVolume - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for AudioManager adjustVolume method.

This code example shows how to use the following methods:adjustVolume
		String data = bundle.getString("Data");
 
		// Increase volume 
		if (data.equals(REMOTE_PLUS_BUTTON)) {
			Log.d(TAG, "Increased Volume");
			audioManager.adjustVolume(AudioManager.ADJUST_RAISE, AudioManager.FLAG_PLAY_SOUND + AudioManager.FLAG_SHOW_UI);
		} 
 
		// Decrease volume 
		if (data.equals(REMOTE_MINUS_BUTTON)) {
			Log.d(TAG, "Decreased Volume");			
			audioManager.adjustVolume(AudioManager.ADJUST_LOWER, AudioManager.FLAG_PLAY_SOUND + AudioManager.FLAG_SHOW_UI);
		} 
 
		// Select Next song 
		if (data.equals(REMOTE_NEXT_BUTTON)) {
			Log.d(TAG, "Next Song");
			try { 
				musicConn.nextSong();
			} catch (RemoteException e) {
5
CodeRank
This code example shows how to use the following methods:adjustVolume
    @Override 
    public void onClick(View v) {
        collapseStatusBar(); 
        dismissKeyguard(); 
 
        am.adjustVolume(AudioManager.ADJUST_SAME, AudioManager.FLAG_SHOW_UI);
    } 
 
    @Override 
    public boolean onLongClick(View v) {
        dismissKeyguard(); 
        collapseStatusBar(); 
        startActivity(new Intent(android.provider.Settings.ACTION_SOUND_SETTINGS));
        return super.onLongClick(v);
    } 
 
} 
4
CodeRank
This code example shows how to use the following methods:adjustVolume
    @Override 
    public void onClick(View v) {
        collapseStatusBar(); 
        dismissKeyguard(); 
 
        am.adjustVolume(AudioManager.ADJUST_SAME, AudioManager.FLAG_SHOW_UI);
    } 
 
    @Override 
    public boolean onLongClick(View v) {
        dismissKeyguard(); 
        collapseStatusBar(); 
        startActivity(new Intent(android.provider.Settings.ACTION_SOUND_SETTINGS));
        return super.onLongClick(v);
    } 
 
} 
5
CodeRank
This code example shows how to use the following methods:adjustVolume
	 * @param am 
	 *            AudioManager���� 
	 */ 
	public void rVolume(AudioManager am) {
		/** ������������ */ 
		am.adjustVolume(AudioManager.ADJUST_RAISE, 0);
	} 
 
	/** 
	 * ���� 
	 *  
	 * @param am 
	 *            AudioManager���� 
	 */ 
	public void silent(AudioManager am) {
		if (!silence) {
			am.setStreamMute(AudioManager.STREAM_MUSIC, true);
			silence = true;
		} 
 
3
CodeRank

Related AudioManager adjustVolume Questions & Answers:

adjustVolume Method Overview
Adjusts the volume of the most relevant stream.
See Code Examples for other Android AudioManager Methods: