From d60282e0d01f52cafaad2ab34c65b322ad8763f5 Mon Sep 17 00:00:00 2001 From: Selcuk Kekec Date: Thu, 3 Nov 2022 21:30:57 +0100 Subject: [PATCH 1/2] Dexcom G7 integration for dev --- app/src/main/AndroidManifest.xml | 1 + .../info/nightscout/androidaps/plugins/source/DexcomPlugin.kt | 3 ++- .../java/info/nightscout/androidaps/receivers/DataReceiver.kt | 3 +++ .../main/java/info/nightscout/androidaps/receivers/Intents.kt | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index cd227043a88..4eb4f5d4cba 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -117,6 +117,7 @@ + diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/source/DexcomPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/source/DexcomPlugin.kt index b48dc49fd4b..fc1a4660671 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/source/DexcomPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/source/DexcomPlugin.kt @@ -233,7 +233,8 @@ class DexcomPlugin @Inject constructor( "com.dexcom.cgm.region1.mgdl", "com.dexcom.cgm.region1.mmol", "com.dexcom.cgm.region2.mgdl", "com.dexcom.cgm.region2.mmol", "com.dexcom.g6.region1.mmol", "com.dexcom.g6.region2.mgdl", - "com.dexcom.g6.region3.mgdl", "com.dexcom.g6.region3.mmol", "com.dexcom.g6" + "com.dexcom.g6.region3.mgdl", "com.dexcom.g6.region3.mmol", + "com.dexcom.g6", "com.dexcom.g7" ) const val PERMISSION = "com.dexcom.cgm.EXTERNAL_PERMISSION" } diff --git a/app/src/main/java/info/nightscout/androidaps/receivers/DataReceiver.kt b/app/src/main/java/info/nightscout/androidaps/receivers/DataReceiver.kt index c19b71ad8e2..fa4c0a7e21b 100644 --- a/app/src/main/java/info/nightscout/androidaps/receivers/DataReceiver.kt +++ b/app/src/main/java/info/nightscout/androidaps/receivers/DataReceiver.kt @@ -64,6 +64,9 @@ open class DataReceiver : DaggerBroadcastReceiver() { Intents.DEXCOM_BG -> OneTimeWorkRequest.Builder(DexcomPlugin.DexcomWorker::class.java) .setInputData(dataWorkerStorage.storeInputData(bundle, intent.action)).build() + Intents.DEXCOM_G7_BG -> + OneTimeWorkRequest.Builder(DexcomPlugin.DexcomWorker::class.java) + .setInputData(dataWorkerStorage.storeInputData(bundle, intent.action)).build() Intents.AIDEX_NEW_BG_ESTIMATE -> OneTimeWorkRequest.Builder(AidexPlugin.AidexWorker::class.java) .setInputData(dataWorkerStorage.storeInputData(bundle, intent.action)).build() diff --git a/core/src/main/java/info/nightscout/androidaps/receivers/Intents.kt b/core/src/main/java/info/nightscout/androidaps/receivers/Intents.kt index 8d09939b117..c13ead91501 100644 --- a/core/src/main/java/info/nightscout/androidaps/receivers/Intents.kt +++ b/core/src/main/java/info/nightscout/androidaps/receivers/Intents.kt @@ -27,6 +27,7 @@ interface Intents { const val ACTION_REMOTE_CALIBRATION = "com.eveningoutpost.dexdrip.NewCalibration" const val GLIMP_BG = "it.ct.glicemia.ACTION_GLUCOSE_MEASURED" const val DEXCOM_BG = "com.dexcom.cgm.EXTERNAL_BROADCAST" + const val DEXCOM_G7_BG = "com.dexcom.g7.EXTERNAL_BROADCAST" const val EVERSENSE_BG = "com.senseonics.AndroidAPSEventSubscriber.BROADCAST" const val POCTECH_BG = "com.china.poctech.data" const val TOMATO_BG = "com.fanqies.tomatofn.BgEstimate" From c3b33807d20ef16609fabc6f50a22f8e0221d264 Mon Sep 17 00:00:00 2001 From: Selcuk Kekec Date: Thu, 3 Nov 2022 21:37:31 +0100 Subject: [PATCH 2/2] AGP decreased because of android studio compatibility issues --- build.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 84bd819423d..e1a4f71eea6 100644 --- a/build.gradle +++ b/build.gradle @@ -44,6 +44,7 @@ buildscript { wearable_version = '2.9.0' play_services_wearable_version = '17.1.0' play_services_location_version = '20.0.0' + agp_version = '7.2.1' } repositories { google() @@ -51,7 +52,7 @@ buildscript { maven { url "https://plugins.gradle.org/m2/" } // jacoco 0.2 } dependencies { - classpath 'com.android.tools.build:gradle:7.3.1' + classpath "com.android.tools.build:gradle:$agp_version" classpath 'com.google.gms:google-services:4.3.14' classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'