From 158ca44f07e97225498f2338d960f96f16035014 Mon Sep 17 00:00:00 2001 From: ktind Date: Sun, 14 Sep 2014 08:32:31 -0500 Subject: [PATCH] -Android notification is now mandatory and displays messages from other monitors e.g. user Receives alerts that MQTT is down or Mongo credentials are incorrect. -Detailed exception handling around G4 IO errors -Added a new condition to handle mongo not connected --- .idea/gradle.xml | 2 +- .idea/modules.xml | 2 +- mobile/build.gradle | 8 +- mobile/mobile.iml | 9 +- mobile/src/main/AndroidManifest.xml | 41 +- .../com/ktind/cgm/bgscout/AbstractDevice.java | 27 +- .../ktind/cgm/bgscout/AbstractMonitor.java | 2 +- .../bgscout/AndroidNotificationMonitor.java | 250 ++++++- .../cgm/bgscout/CGMDownloadAnalyzer.java | 7 + .../com/ktind/cgm/bgscout/Conditions.java | 3 +- .../com/ktind/cgm/bgscout/DeviceActivity.java | 685 ------------------ .../cgm/bgscout/DeviceDownloadService.java | 17 +- .../com/ktind/cgm/bgscout/DexcomG4/G4.java | 6 +- .../com/ktind/cgm/bgscout/MainActivity.java | 1 + .../ktind/cgm/bgscout/MongoUploadMonitor.java | 46 +- .../cgm/bgscout/StaticAlertMessages.java | 54 ++ .../com/ktind/cgm/bgscout/WearMonitor.java | 110 +++ .../com/ktind/cgm/bgscout/mqtt/MQTTMgr.java | 14 +- mobile/src/main/res/values/strings.xml | 40 +- mobile/src/main/res/xml/pref_general.xml | 120 +-- settings.gradle | 3 +- wear/build.gradle | 3 +- wear/src/main/AndroidManifest.xml | 30 +- .../ktind/cgm/bgscout/ListenerService.java | 57 ++ .../com/ktind/cgm/bgscout/MyActivity.java | 76 ++ wear/src/main/res/layout/activity_display.xml | 40 + wear/src/main/res/layout/activity_my.xml | 39 + wear/src/main/res/layout/rect_activity_my.xml | 41 ++ .../src/main/res/layout/round_activity_my.xml | 42 ++ wear/src/main/res/values/strings.xml | 9 + wear/wear.iml | 8 +- 31 files changed, 908 insertions(+), 884 deletions(-) delete mode 100644 mobile/src/main/java/com/ktind/cgm/bgscout/DeviceActivity.java create mode 100644 mobile/src/main/java/com/ktind/cgm/bgscout/StaticAlertMessages.java create mode 100644 mobile/src/main/java/com/ktind/cgm/bgscout/WearMonitor.java create mode 100644 wear/src/main/java/com/ktind/cgm/bgscout/ListenerService.java create mode 100644 wear/src/main/java/com/ktind/cgm/bgscout/MyActivity.java create mode 100644 wear/src/main/res/layout/activity_display.xml create mode 100644 wear/src/main/res/layout/activity_my.xml create mode 100644 wear/src/main/res/layout/rect_activity_my.xml create mode 100644 wear/src/main/res/layout/round_activity_my.xml diff --git a/.idea/gradle.xml b/.idea/gradle.xml index f100aa7..8eab26b 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -8,8 +8,8 @@ diff --git a/.idea/modules.xml b/.idea/modules.xml index f46ce42..83ad06f 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -3,8 +3,8 @@ + - diff --git a/mobile/build.gradle b/mobile/build.gradle index 2222d40..3172acb 100644 --- a/mobile/build.gradle +++ b/mobile/build.gradle @@ -8,8 +8,8 @@ android { applicationId "com.ktind.cgm.bgscout" minSdkVersion 16 targetSdkVersion 20 - versionCode 9 - versionName "0.0.9" + versionCode 10 + versionName "0.1.1" } buildTypes { release { @@ -27,8 +27,8 @@ dependencies { compile files('libs/protobuf-java-2.5.0.jar') compile files('libs/acra-4.5.0.jar') compile 'com.google.android.gms:play-services-wearable:5.0.77' - compile 'com.android.support:support-v4:20.0.0' + compile 'com.android.support:support-v4:20.0.+' compile 'com.google.code.gson:gson:2.3' compile 'com.android.support:support-v13:20.0.0' - compile project(':pEBBLE_KIT') + compile project(':PEBBLE_KIT') } diff --git a/mobile/mobile.iml b/mobile/mobile.iml index 1cfd26d..9362bea 100644 --- a/mobile/mobile.iml +++ b/mobile/mobile.iml @@ -13,6 +13,7 @@