added openAPSEnabledAlerts()
check for OpenAPS alerts enabled
This commit is contained in:
parent
3d9df4e18e
commit
ad122153a9
1 changed files with 12 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue