public static boolean currentlyAlerting() { final ActiveBgAlert activeBgAlert = getOnly(); return activeBgAlert != null && !activeBgAlert.is_snoozed; }
public static boolean currentlyAlerting() { final ActiveBgAlert activeBgAlert = getOnly(); return activeBgAlert != null && !activeBgAlert.is_snoozed; }
public void onClick(View v) { ActiveBgAlert aba = ActiveBgAlert.getOnly(); ActiveBgAlert.ClearData(); ActiveBgAlert.Create("some string", true, new Date().getTime()); } });
public void onClick(View v) { ActiveBgAlert aba = ActiveBgAlert.getOnly(); ActiveBgAlert.ClearData(); ActiveBgAlert.Create("some string", true, new Date().getTime()); } });
public static void ClearIfSnoozeFinished() { Log.d(TAG, "ActiveBgAlert ClearIfSnoozeFinished called"); ActiveBgAlert aba = getOnly(); if (aba != null) { if(new Date().getTime() > aba.next_alert_at) { Log.d(TAG, "ActiveBgAlert ClearIfSnoozeFinished deleting allert"); aba.delete(); } } }
public static boolean alertSnoozeOver() { ActiveBgAlert activeBgAlert = getOnly(); if (activeBgAlert == null) { // no alert exists, so snoozing is over... (this should not happen) Log.wtf(TAG, "ActiveBgAlert getOnly returning null (we have just checked it)"); return true; } return activeBgAlert.ready_to_alarm(); }
public static boolean alertSnoozeOver() { ActiveBgAlert activeBgAlert = getOnly(); if (activeBgAlert == null) { // no alert exists, so snoozing is over... (this should not happen) Log.wtf(TAG, "ActiveBgAlert getOnly returning null (we have just checked it)"); return true; } return activeBgAlert.ready_to_alarm(); }
public static void ClearData() { Log.d(TAG, "ActiveBgAlert ClearData called"); ActiveBgAlert aba = getOnly(); if (aba != null) { aba.delete(); } }
public static void ClearData() { Log.d(TAG, "ActiveBgAlert ClearData called"); ActiveBgAlert aba = getOnly(); if (aba != null) { aba.delete(); } }
public static void ClearIfSnoozeFinished() { Log.d(TAG, "ActiveBgAlert ClearIfSnoozeFinished called"); ActiveBgAlert aba = getOnly(); if (aba != null) { if(new Date().getTime() > aba.next_alert_at) { Log.d(TAG, "ActiveBgAlert ClearIfSnoozeFinished deleting allert"); aba.delete(); } } }
public static void ClearData() { Log.d(TAG, "ActiveBgAlert ClearData called"); ActiveBgAlert aba = getOnly(); if (aba != null) { aba.delete(); } }
public static void ClearIfSnoozeFinished() { Log.d(TAG, "ActiveBgAlert ClearIfSnoozeFinished called"); ActiveBgAlert aba = getOnly(); if (aba != null) { if(new Date().getTime() > aba.next_alert_at) { Log.d(TAG, "ActiveBgAlert ClearIfSnoozeFinished deleting allert"); aba.delete(); } } }
public static boolean alertSnoozeOver() { ActiveBgAlert activeBgAlert = getOnly(); if (activeBgAlert == null) { // no alert exists, so snoozing is over... (this should not happen) Log.wtf(TAG, "ActiveBgAlert getOnly returning null (we have just checked it)"); return true; } return activeBgAlert.ready_to_alarm(); }
public static void Create(String alert_uuid, boolean is_snoozed, Long next_alert_at) { Log.d(TAG, "ActiveBgAlert Create called"); fixUpTable(); ActiveBgAlert aba = getOnly(); if (aba == null) { aba = new ActiveBgAlert(); } aba.alert_uuid = alert_uuid; aba.is_snoozed = is_snoozed; aba.last_alerted_at = 0L; aba.next_alert_at = next_alert_at; aba.alert_started_at = new Date().getTime(); aba.save(); }
public synchronized void PreSnooze(Context ctx, String uuid, int repeatTime) { Log.i(TAG, "PreSnooze called repeatTime = "+ repeatTime); stopAlert(ctx, true, false); ActiveBgAlert.Create(uuid, true, new Date().getTime() + repeatTime * 60000); ActiveBgAlert activeBgAlert = ActiveBgAlert.getOnly(); if (activeBgAlert == null) { Log.wtf(TAG, "Just created the alert, where did it go..."); return; } activeBgAlert.snooze(repeatTime); }
public synchronized void PreSnooze(Context ctx, String uuid, int repeatTime) { Log.i(TAG, "PreSnooze called repeatTime = "+ repeatTime); stopAlert(ctx, true, false); ActiveBgAlert.Create(uuid, true, new Date().getTime() + repeatTime * 60000); ActiveBgAlert activeBgAlert = ActiveBgAlert.getOnly(); if (activeBgAlert == null) { Log.wtf(TAG, "Just created the alert, where did it go..."); return; } activeBgAlert.snooze(repeatTime); }
public synchronized void PreSnooze(Context ctx, String uuid, int repeatTime) { Log.i(TAG, "PreSnooze called repeatTime = "+ repeatTime); stopAlert(ctx, true, false); ActiveBgAlert.Create(uuid, true, new Date().getTime() + repeatTime * 60000); ActiveBgAlert activeBgAlert = ActiveBgAlert.getOnly(); if (activeBgAlert == null) { Log.wtf(TAG, "Just created the alert, where did it go..."); return; } activeBgAlert.snooze(repeatTime); }
public void onClick(View v) { int intValue = getTimeFromSnoozeValue(snoozeValue.getValue()); AlertPlayer.getPlayer().Snooze(getApplicationContext(), intValue); Intent intent = new Intent(getApplicationContext(), Home.class); if (ActiveBgAlert.getOnly() != null) { startActivity(intent); } finish(); }
public void onClick(View v) { int intValue = getTimeFromSnoozeValue(snoozeValue.getValue()); AlertPlayer.getPlayer().Snooze(getApplicationContext(), intValue); Intent intent = new Intent(getApplicationContext(), Home.class); if (ActiveBgAlert.getOnly() != null) { Log.e(TAG, "Snoozed! ActiveBgAlert.getOnly() != null TODO restart Home.class - watchface?"); //KS TODO startActivity(intent); } finish(); }
public void onClick(View v) { int intValue = getTimeFromSnoozeValue(snoozeValue.getValue()); AlertPlayer.getPlayer().Snooze(getApplicationContext(), intValue); Intent intent = new Intent(getApplicationContext(), Home.class); if (ActiveBgAlert.getOnly() != null) { startActivity(intent); } finish(); }