Android examples for android.media:Audio
turn Down audio
import android.content.Context; import android.media.AudioManager; public class Main { public static void turnDown(Context context) { AudioManager audioMgr = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); audioMgr.setRingerMode(AudioManager.RINGER_MODE_SILENT); // audioMgr.setVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER, // AudioManager.VIBRATE_SETTING_OFF); }/* w w w .j a v a 2 s . c o m*/ }