diff --git a/app/build.gradle b/app/build.gradle index e37c577e97..e27e82d15d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -91,6 +91,7 @@ android { buildConfigField "boolean", "NSCLIENTOLNY", "false" buildConfigField "boolean", "CLOSEDLOOP", "true" buildConfigField "boolean", "G5UPLOADER", "false" + buildConfigField "boolean", "PUMPCONTROL", "false" } openloop { dimension "standard" @@ -104,6 +105,7 @@ android { buildConfigField "boolean", "NSCLIENTOLNY", "false" buildConfigField "boolean", "CLOSEDLOOP", "false" buildConfigField "boolean", "G5UPLOADER", "false" + buildConfigField "boolean", "PUMPCONTROL", "false" } pumpcontrol { dimension "standard" @@ -117,6 +119,7 @@ android { buildConfigField "boolean", "NSCLIENTOLNY", "false" buildConfigField "boolean", "CLOSEDLOOP", "false" buildConfigField "boolean", "G5UPLOADER", "false" + buildConfigField "boolean", "PUMPCONTROL", "true" } nsclient { dimension "standard" @@ -130,6 +133,7 @@ android { buildConfigField "boolean", "NSCLIENTOLNY", "true" buildConfigField "boolean", "CLOSEDLOOP", "false" buildConfigField "boolean", "G5UPLOADER", "false" + buildConfigField "boolean", "PUMPCONTROL", "false" } g5uploader { dimension "standard" @@ -143,6 +147,7 @@ android { buildConfigField "boolean", "NSCLIENTOLNY", "false" buildConfigField "boolean", "CLOSEDLOOP", "false" buildConfigField "boolean", "G5UPLOADER", "true" + buildConfigField "boolean", "PUMPCONTROL", "false" } } } diff --git a/app/src/main/java/info/nightscout/androidaps/Config.java b/app/src/main/java/info/nightscout/androidaps/Config.java index 50d3b2e853..3c8d6095ed 100644 --- a/app/src/main/java/info/nightscout/androidaps/Config.java +++ b/app/src/main/java/info/nightscout/androidaps/Config.java @@ -11,6 +11,7 @@ public class Config { // PLUGINS public static final boolean NSCLIENT = BuildConfig.NSCLIENTOLNY; public static final boolean G5UPLOADER = BuildConfig.G5UPLOADER; + public static final boolean PUMPCONTROL = BuildConfig.PUMPCONTROL; public static final boolean DANAR = BuildConfig.PUMPDRIVERS; diff --git a/app/src/main/java/info/nightscout/androidaps/MainApp.java b/app/src/main/java/info/nightscout/androidaps/MainApp.java index 4bba16080b..56c712f629 100644 --- a/app/src/main/java/info/nightscout/androidaps/MainApp.java +++ b/app/src/main/java/info/nightscout/androidaps/MainApp.java @@ -165,10 +165,16 @@ public class MainApp extends Application { MainApp.getConfigBuilder().initialize(); } NSUpload.uploadAppStart(); - if (MainApp.getConfigBuilder().isClosedModeEnabled()) + if (Config.NSCLIENT) + Answers.getInstance().logCustom(new CustomEvent("AppStart-NSClient")); + else if (Config.G5UPLOADER) + Answers.getInstance().logCustom(new CustomEvent("AppStart-G5Uploader")); + else if (Config.PUMPCONTROL) + Answers.getInstance().logCustom(new CustomEvent("AppStart-PumpControl")); + else if (MainApp.getConfigBuilder().isClosedModeEnabled()) Answers.getInstance().logCustom(new CustomEvent("AppStart-ClosedLoop")); else - Answers.getInstance().logCustom(new CustomEvent("AppStart")); + Answers.getInstance().logCustom(new CustomEvent("AppStart-OpenLoop")); new Thread(new Runnable() { @Override