List of utility methods to do Alarm Get
long | getNextAlarmTimeSpan(String time) get Next Alarm Time Span calendar.clear();
calendar.setTime(parseDate(time));
return (calendar.getTimeInMillis() - System.currentTimeMillis()) / 1000;
|
AlarmManager | getAlarmManager(Context ctx) get Alarm Manager return (AlarmManager) ctx.getSystemService(Context.ALARM_SERVICE);
|
AlarmManager | getAlarmManager(Context context) get Alarm Manager return (AlarmManager) context
.getSystemService(Context.ALARM_SERVICE);
|
Uri | getDefaultAlarmUri() get Default Alarm Uri try { Field f = Settings.System.class .getField("DEFAULT_ALARM_ALERT_URI"); return (Uri) f.get(null); } catch (Exception e) { return Settings.System.DEFAULT_NOTIFICATION_URI; |
Uri | getDefaultAlarmUri() get Default Alarm Uri try { Field f = Settings.System.class .getField("DEFAULT_ALARM_ALERT_URI"); return (Uri) f.get(null); } catch (Exception e) { return Settings.System.DEFAULT_NOTIFICATION_URI; |
Calendar | getNextAlarmTimeAbsolute(int hourOfDay, int minute) get Next Alarm Time Absolute Calendar cal = Calendar.getInstance();
Calendar calNow = (Calendar) cal.clone();
cal.set(Calendar.HOUR_OF_DAY, hourOfDay);
cal.set(Calendar.MINUTE, minute);
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.MILLISECOND, 0);
if (cal.compareTo(calNow) <= 0) {
cal.add(Calendar.DATE, 1);
...
|
Dialog | getAlertDialog(Context context, String title, String message, String okText, DialogInterface.OnClickListener onClickOK) get Alert Dialog return getConfirmDialog(context, title, message, okText, onClickOK,
null, null);
|