Android examples for android.app:AlarmManager
get Alarm Volume From Percentage
import android.media.AudioManager; public class Main { public static int getAlarmVolumeFromPercentage(AudioManager audioManager, int audioStream, float percentage) { int volume = (int) Math.ceil((double) audioManager.getStreamMaxVolume(audioStream) * (percentage / 100.0d)); return volume; }//from w ww.j a v a 2s .c o m }