diff --git a/app/build.gradle b/app/build.gradle
index 8185303f..e45e04cb 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -63,7 +63,7 @@ android {
}
dependencies {
- implementation 'com.github.SimpleMobileTools:Simple-Commons:c8c3073668'
+ implementation 'com.github.SimpleMobileTools:Simple-Commons:0e71682b27'
implementation 'com.facebook.stetho:stetho:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'com.shawnlin:number-picker:2.4.6'
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 2a620c05..a25c67b7 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -8,6 +8,7 @@
+
getString(R.string.timer_single_notification_label_msg, firstTimer.label)
else -> resources.getQuantityString(R.plurals.timer_notification_msg, runningTimers.size, runningTimers.size)
}
- startForeground(TIMER_RUNNING_NOTIF_ID, notification(formattedDuration, contextText, firstTimer.id!!))
+
+ Handler(Looper.getMainLooper()).post {
+ startForeground(TIMER_RUNNING_NOTIF_ID, notification(formattedDuration, contextText, firstTimer.id!!))
+ }
} else {
stopService()
}
@@ -109,7 +114,9 @@ class TimerService : Service() {
}
fun startTimerService(context: Context) {
- ContextCompat.startForegroundService(context, Intent(context, TimerService::class.java))
+ Handler(Looper.getMainLooper()).post {
+ ContextCompat.startForegroundService(context, Intent(context, TimerService::class.java))
+ }
}
object TimerStopService
diff --git a/build.gradle b/build.gradle
index cf4af380..a13b99ff 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
- ext.kotlin_version = '1.6.20'
+ ext.kotlin_version = '1.6.21'
repositories {
google()