KeepAliveReceiver: add alarm sound to 'pump unreachable' notification.
This commit is contained in:
parent
7b3f474b58
commit
001a56728d
|
@ -20,6 +20,7 @@ import java.util.Date;
|
|||
|
||||
import info.nightscout.androidaps.Constants;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.interfaces.PumpInterface;
|
||||
import info.nightscout.androidaps.data.Profile;
|
||||
import info.nightscout.androidaps.plugins.Overview.Notification;
|
||||
|
@ -49,9 +50,9 @@ public class KeepAliveReceiver extends BroadcastReceiver {
|
|||
|
||||
SharedPreferences SP = PreferenceManager.getDefaultSharedPreferences(MainApp.instance().getApplicationContext());
|
||||
if (isStatusOutdated && lastConnection.getTime() + 25 * 60 * 1000 < System.currentTimeMillis()) {
|
||||
MainApp.bus().post(new EventNewNotification(
|
||||
new Notification(Notification.PUMP_UNREACHABLE,
|
||||
"Pump connection could not be established for more than 25 minutes", Notification.URGENT)));
|
||||
Notification n = new Notification(Notification.PUMP_UNREACHABLE, "Pump unreachable", Notification.URGENT);
|
||||
n.soundId = R.raw.alarm;
|
||||
MainApp.bus().post(new EventNewNotification(n));
|
||||
} else if (SP.getBoolean("syncprofiletopump", false) && !pump.isThisProfileSet(profile)) {
|
||||
Thread t = new Thread(new Runnable() {
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue