Java tutorial
//package com.java2s; import android.media.AudioManager; public class Main { public static void setRingAndVibrate(AudioManager audiomanager) { audiomanager.setRingerMode(AudioManager.RINGER_MODE_NORMAL); audiomanager.setVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER, AudioManager.VIBRATE_SETTING_ON); } }