From c821ef97d8bb93695f657feb99c3baf0fb6de615 Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Wed, 14 Feb 2018 15:02:04 +0100 Subject: [PATCH] option to enable wear/SMB notifications --- .../info/nightscout/androidaps/plugins/Wear/WearPlugin.java | 2 +- app/src/main/res/values/strings.xml | 2 ++ app/src/main/res/xml/pref_wear.xml | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Wear/WearPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/Wear/WearPlugin.java index ee5630a4f1..b72a767278 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Wear/WearPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Wear/WearPlugin.java @@ -197,7 +197,7 @@ public class WearPlugin implements PluginBase { @Subscribe public void onStatusEvent(final EventOverviewBolusProgress ev) { - if(!ev.isSMB()) { + if(!ev.isSMB()||SP.getBoolean("wear_notifySMB", false)) { Intent intent = new Intent(ctx, WatchUpdaterService.class).setAction(WatchUpdaterService.ACTION_SEND_BOLUSPROGRESS); intent.putExtra("progresspercent", ev.percent); intent.putExtra("progressstatus", ev.status); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f035818105..915e6c0442 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -929,5 +929,7 @@ Let current temp basal run Mute History browser + Notify on SMB + Show SMB on the watch like a standard bolus. diff --git a/app/src/main/res/xml/pref_wear.xml b/app/src/main/res/xml/pref_wear.xml index 406e156ab3..9b51c4b17b 100644 --- a/app/src/main/res/xml/pref_wear.xml +++ b/app/src/main/res/xml/pref_wear.xml @@ -30,6 +30,12 @@ android:key="wear_showbgi" android:summary="@string/wear_showbgi_summary" android:title="@string/wear_showbgi_title" /> + + \ No newline at end of file