adjust Voice Volume - Android Media

Android examples for Media:Media Volume

Description

adjust Voice Volume

Demo Code


//package com.java2s;

import android.content.Context;

import android.media.AudioManager;

public class Main {

    public static void adjustVoiceVolume(Context context, int volume) {
        AudioManager am = (AudioManager) context
                .getSystemService(Context.AUDIO_SERVICE);
        am.setStreamVolume(AudioManager.STREAM_VOICE_CALL, volume,
                AudioManager.FLAG_REMOVE_SOUND_AND_VIBRATE);
    }//from  w w  w . j a  v a2 s  . c  o m
}

Related Tutorials