From e4674f4fb8d6edc9f0d54362c381500def935e05 Mon Sep 17 00:00:00 2001 From: pachi81 Date: Wed, 13 Mar 2024 18:20:44 +0100 Subject: [PATCH] Fix crash --- auto/build.gradle | 4 ++-- build.gradle | 4 ++-- .../michelinside/glucodatahandler/common/GlucoDataService.kt | 2 +- .../java/de/michelinside/glucodatahandler/WaerActivity.kt | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/auto/build.gradle b/auto/build.gradle index 5b510e64..c811b7d6 100644 --- a/auto/build.gradle +++ b/auto/build.gradle @@ -11,8 +11,8 @@ android { applicationId "de.michelinside.glucodataauto" minSdk rootProject.minSdk targetSdk rootProject.targetSdk - versionCode 1022 - versionName "0.9.9.7" + versionCode 1025 + versionName "0.9.10" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/build.gradle b/build.gradle index f6b3db73..237f9244 100644 --- a/build.gradle +++ b/build.gradle @@ -5,8 +5,8 @@ plugins { id 'org.jetbrains.kotlin.android' version '1.8.20' apply false } -project.ext.set("versionCode", 25) -project.ext.set("versionName", "0.9.10") +project.ext.set("versionCode", 26) +project.ext.set("versionName", "0.9.11") project.ext.set("compileSdk", 34) project.ext.set("targetSdk", 33) project.ext.set("minSdk", 26) diff --git a/common/src/main/java/de/michelinside/glucodatahandler/common/GlucoDataService.kt b/common/src/main/java/de/michelinside/glucodatahandler/common/GlucoDataService.kt index 3d56ddda..523b1faf 100644 --- a/common/src/main/java/de/michelinside/glucodatahandler/common/GlucoDataService.kt +++ b/common/src/main/java/de/michelinside/glucodatahandler/common/GlucoDataService.kt @@ -80,7 +80,7 @@ abstract class GlucoDataService(source: AppSource) : WearableListenerService() { // default on wear and phone true//sharedPref.getBoolean(Constants.SHARED_PREF_FOREGROUND_SERVICE, true) ) - context.startForegroundService(serviceIntent) + context.startService(serviceIntent) } catch (exc: Exception) { Log.e( LOG_ID, diff --git a/wear/src/main/java/de/michelinside/glucodatahandler/WaerActivity.kt b/wear/src/main/java/de/michelinside/glucodatahandler/WaerActivity.kt index c547914e..6eff97af 100644 --- a/wear/src/main/java/de/michelinside/glucodatahandler/WaerActivity.kt +++ b/wear/src/main/java/de/michelinside/glucodatahandler/WaerActivity.kt @@ -83,7 +83,7 @@ class WaerActivity : AppCompatActivity(), NotifierInterface { val serviceIntent = Intent(this, GlucoDataServiceWear::class.java) if (isChecked) { serviceIntent.putExtra(Constants.SHARED_PREF_FOREGROUND_SERVICE, true) - this.startForegroundService(serviceIntent) + this.startService(serviceIntent) } else { serviceIntent.putExtra(Constants.ACTION_STOP_FOREGROUND, true) this.startService(serviceIntent)