Here you can find the source of turnUpSecond(Context context)
public static void turnUpSecond(Context context)
import android.content.Context; import android.media.AudioManager; public class Main{ public static void turnUpSecond(Context context) { Debug.e("Globle", "turnUpSecond"); AudioManager audioMgr = (AudioManager) context .getSystemService(Context.AUDIO_SERVICE); audioMgr.setRingerMode(AudioManager.RINGER_MODE_NORMAL); audioMgr.setStreamVolume(AudioManager.STREAM_RING, audioMgr.getStreamMaxVolume(AudioManager.STREAM_RING) - 2, 0);//ww w .ja v a2 s . com audioMgr.setStreamVolume(AudioManager.STREAM_NOTIFICATION, audioMgr .getStreamMaxVolume(AudioManager.STREAM_NOTIFICATION) - 2, 0); audioMgr.setVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER, AudioManager.VIBRATE_SETTING_ON); } }