diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSSettingsStatus.java b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSSettingsStatus.java index f7a2de3144..bb01050702 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSSettingsStatus.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSSettingsStatus.java @@ -305,6 +305,7 @@ public class NSSettingsStatus { return 0d; } + @Nullable public JSONObject extentendedPumpSettings() { try { @@ -343,5 +344,16 @@ public class NSSettingsStatus { return ""; } + public boolean openAPSEnabledAlerts() { + try { + JSONObject pump = extentendedPumpSettings(); + if (pump != null && pump.has("openaps")) { + return pump.getBoolean("enableAlerts"); + } + } catch (JSONException e) { + e.printStackTrace(); + } + return false; + } }