Java Code Examples for com.eveningoutpost.dexdrip.Models.AlertType#getNextAlertTime()
The following examples show how to use
com.eveningoutpost.dexdrip.Models.AlertType#getNextAlertTime() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AlertPlayer.java From xDrip with GNU General Public License v3.0 | 5 votes |
public synchronized void startAlert(Context ctx, boolean trendingToAlertEnd, AlertType newAlert, String bgValue , boolean start_snoozed) { Log.d(TAG, "startAlert called, Threadid " + Thread.currentThread().getId()); if (trendingToAlertEnd) { Log.d(TAG, "startAlert: This alert is trending to it's end will not do anything"); return; } stopAlert(ctx, true, false); long nextAlertTime = newAlert.getNextAlertTime(ctx); ActiveBgAlert.Create(newAlert.uuid, start_snoozed, nextAlertTime); if (!start_snoozed) Vibrate(ctx, newAlert, bgValue, newAlert.override_silent_mode, 0); }
Example 2
Source File: AlertPlayer.java From xDrip with GNU General Public License v3.0 | 5 votes |
public void ClockTick(Context ctx, boolean trendingToAlertEnd, String bgValue) { if (trendingToAlertEnd) { Log.d(TAG,"ClockTick: This alert is trending to it's end will not do anything"); return; } ActiveBgAlert activeBgAlert = ActiveBgAlert.getOnly(); if (activeBgAlert == null) { // Nothing to do ... return; } if(activeBgAlert.ready_to_alarm()) { stopAlert(ctx, false, false, false); // also don't cancel notification int timeFromStartPlaying = activeBgAlert.getUpdatePlayTime(); AlertType alert = AlertType.get_alert(activeBgAlert.alert_uuid); if (alert == null) { Log.d(TAG, "ClockTick: The alert was already deleted... will not play"); ActiveBgAlert.ClearData(); return; } Log.d(TAG,"ClockTick: Playing the alert again"); long nextAlertTime = alert.getNextAlertTime(ctx); activeBgAlert.updateNextAlertAt(nextAlertTime); Vibrate(ctx, alert, bgValue, alert.override_silent_mode, timeFromStartPlaying); } }
Example 3
Source File: AlertPlayer.java From xDrip with GNU General Public License v3.0 | 5 votes |
public synchronized void startAlert(Context ctx, boolean trendingToAlertEnd, AlertType newAlert, String bgValue , boolean start_snoozed) { Log.d(TAG, "startAlert called, Threadid " + Thread.currentThread().getId()); if (trendingToAlertEnd) { Log.d(TAG, "startAlert: This alert is trending to it's end will not do anything"); return; } stopAlert(ctx, true, false); long nextAlertTime = newAlert.getNextAlertTime(ctx); ActiveBgAlert.Create(newAlert.uuid, start_snoozed, nextAlertTime); if (!start_snoozed) VibrateNotifyMakeNoise(ctx, newAlert, bgValue, 0); AlertTracker.evaluate(); }
Example 4
Source File: AlertPlayer.java From xDrip with GNU General Public License v3.0 | 5 votes |
public void ClockTick(Context ctx, boolean trendingToAlertEnd, String bgValue) { if (trendingToAlertEnd) { Log.d(TAG,"ClockTick: This alert is trending to it's end will not do anything"); return; } ActiveBgAlert activeBgAlert = ActiveBgAlert.getOnly(); if (activeBgAlert == null) { // Nothing to do ... return; } if(activeBgAlert.ready_to_alarm()) { stopAlert(ctx, false, false, false); // also don't cancel notification final int minutesFromStartPlaying = activeBgAlert.getAndUpdateAlertingMinutes(); final AlertType alert = AlertType.get_alert(activeBgAlert.alert_uuid); if (alert == null) { Log.d(TAG, "ClockTick: The alert was already deleted... will not play"); ActiveBgAlert.ClearData(); return; } Log.d(TAG,"ClockTick: Playing the alert again"); long nextAlertTime = alert.getNextAlertTime(ctx); activeBgAlert.updateNextAlertAt(nextAlertTime); VibrateNotifyMakeNoise(ctx, alert, bgValue, minutesFromStartPlaying); AlertTracker.evaluate(); } }
Example 5
Source File: AlertPlayer.java From xDrip-plus with GNU General Public License v3.0 | 5 votes |
public synchronized void startAlert(Context ctx, boolean trendingToAlertEnd, AlertType newAlert, String bgValue , boolean start_snoozed) { Log.d(TAG, "startAlert called, Threadid " + Thread.currentThread().getId()); if (trendingToAlertEnd) { Log.d(TAG, "startAlert: This alert is trending to it's end will not do anything"); return; } stopAlert(ctx, true, false); long nextAlertTime = newAlert.getNextAlertTime(ctx); ActiveBgAlert.Create(newAlert.uuid, start_snoozed, nextAlertTime); if (!start_snoozed) Vibrate(ctx, newAlert, bgValue, newAlert.override_silent_mode, 0); }
Example 6
Source File: AlertPlayer.java From xDrip-plus with GNU General Public License v3.0 | 5 votes |
public void ClockTick(Context ctx, boolean trendingToAlertEnd, String bgValue) { if (trendingToAlertEnd) { Log.d(TAG,"ClockTick: This alert is trending to it's end will not do anything"); return; } ActiveBgAlert activeBgAlert = ActiveBgAlert.getOnly(); if (activeBgAlert == null) { // Nothing to do ... return; } if(activeBgAlert.ready_to_alarm()) { stopAlert(ctx, false, false, false); // also don't cancel notification int timeFromStartPlaying = activeBgAlert.getUpdatePlayTime(); AlertType alert = AlertType.get_alert(activeBgAlert.alert_uuid); if (alert == null) { Log.d(TAG, "ClockTick: The alert was already deleted... will not play"); ActiveBgAlert.ClearData(); return; } Log.d(TAG,"ClockTick: Playing the alert again"); long nextAlertTime = alert.getNextAlertTime(ctx); activeBgAlert.updateNextAlertAt(nextAlertTime); Vibrate(ctx, alert, bgValue, alert.override_silent_mode, timeFromStartPlaying); } }
Example 7
Source File: AlertPlayer.java From xDrip-plus with GNU General Public License v3.0 | 5 votes |
public synchronized void startAlert(Context ctx, boolean trendingToAlertEnd, AlertType newAlert, String bgValue , boolean start_snoozed) { Log.d(TAG, "startAlert called, Threadid " + Thread.currentThread().getId()); if (trendingToAlertEnd) { Log.d(TAG, "startAlert: This alert is trending to it's end will not do anything"); return; } stopAlert(ctx, true, false); long nextAlertTime = newAlert.getNextAlertTime(ctx); ActiveBgAlert.Create(newAlert.uuid, start_snoozed, nextAlertTime); if (!start_snoozed) VibrateNotifyMakeNoise(ctx, newAlert, bgValue, 0); AlertTracker.evaluate(); }
Example 8
Source File: AlertPlayer.java From xDrip-plus with GNU General Public License v3.0 | 5 votes |
public void ClockTick(Context ctx, boolean trendingToAlertEnd, String bgValue) { if (trendingToAlertEnd) { Log.d(TAG,"ClockTick: This alert is trending to it's end will not do anything"); return; } ActiveBgAlert activeBgAlert = ActiveBgAlert.getOnly(); if (activeBgAlert == null) { // Nothing to do ... return; } if(activeBgAlert.ready_to_alarm()) { stopAlert(ctx, false, false, false); // also don't cancel notification final int minutesFromStartPlaying = activeBgAlert.getAndUpdateAlertingMinutes(); final AlertType alert = AlertType.get_alert(activeBgAlert.alert_uuid); if (alert == null) { Log.d(TAG, "ClockTick: The alert was already deleted... will not play"); ActiveBgAlert.ClearData(); return; } Log.d(TAG,"ClockTick: Playing the alert again"); long nextAlertTime = alert.getNextAlertTime(ctx); activeBgAlert.updateNextAlertAt(nextAlertTime); VibrateNotifyMakeNoise(ctx, alert, bgValue, minutesFromStartPlaying); AlertTracker.evaluate(); } }
Example 9
Source File: AlertPlayer.java From xDrip-Experimental with GNU General Public License v3.0 | 5 votes |
public synchronized void startAlert(Context ctx, boolean trendingToAlertEnd, AlertType newAlert, String bgValue ) { Log.d(TAG, "startAlert called, Threadid " + Thread.currentThread().getId()); if (trendingToAlertEnd) { Log.d(TAG,"startAlert: This alert is trending to it's end will not do anything"); return; } stopAlert(ctx, true, false); long nextAlertTime = newAlert.getNextAlertTime(ctx); ActiveBgAlert.Create(newAlert.uuid, false, nextAlertTime ); Vibrate(ctx, newAlert, bgValue, newAlert.override_silent_mode, 0); }
Example 10
Source File: AlertPlayer.java From xDrip-Experimental with GNU General Public License v3.0 | 5 votes |
public void ClockTick(Context ctx, boolean trendingToAlertEnd, String bgValue) { if (trendingToAlertEnd) { Log.d(TAG,"ClockTick: This alert is trending to it's end will not do anything"); return; } ActiveBgAlert activeBgAlert = ActiveBgAlert.getOnly(); if (activeBgAlert == null) { // Nothing to do ... return; } if(activeBgAlert.ready_to_alarm()) { stopAlert(ctx, false, false); int timeFromStartPlaying = activeBgAlert.getUpdatePlayTime(); AlertType alert = AlertType.get_alert(activeBgAlert.alert_uuid); if (alert == null) { Log.d(TAG, "ClockTick: The alert was already deleted... will not play"); ActiveBgAlert.ClearData(); return; } Log.d(TAG,"ClockTick: Playing the alert again"); long nextAlertTime = alert.getNextAlertTime(ctx); activeBgAlert.updateNextAlertAt(nextAlertTime); Vibrate(ctx, alert, bgValue, alert.override_silent_mode, timeFromStartPlaying); } }