List of usage examples for android.app AlarmManager getNextAlarmClock
public AlarmClockInfo getNextAlarmClock()
From source file:com.androidinspain.deskclock.Utils.java
@TargetApi(Build.VERSION_CODES.LOLLIPOP) private static AlarmClockInfo getNextAlarmClock(AlarmManager am) { return am.getNextAlarmClock(); }
From source file:com.android.deskclock.Utils.java
@TargetApi(Build.VERSION_CODES.LOLLIPOP) private static String getNextAlarmLOrLater(Context context) { final AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); final AlarmManager.AlarmClockInfo info = am.getNextAlarmClock(); if (info != null) { final long triggerTime = info.getTriggerTime(); final Calendar alarmTime = Calendar.getInstance(); alarmTime.setTimeInMillis(triggerTime); return AlarmUtils.getFormattedTime(context, alarmTime); }/* ww w . j a v a 2 s . c o m*/ return null; }