diff --git a/sdk/build.gradle b/sdk/build.gradle index f7ae41fe3..cbf40d0a3 100644 --- a/sdk/build.gradle +++ b/sdk/build.gradle @@ -10,7 +10,7 @@ apply plugin: "org.jetbrains.dokka" apply plugin: 'io.radar.mvnpublish' ext { - radarVersion = '3.9.7' + radarVersion = '3.9.8-beta.1' } String buildNumber = ".${System.currentTimeMillis()}" diff --git a/sdk/src/main/java/io/radar/sdk/RadarForegroundService.kt b/sdk/src/main/java/io/radar/sdk/RadarForegroundService.kt index 283039846..4cae5f40e 100644 --- a/sdk/src/main/java/io/radar/sdk/RadarForegroundService.kt +++ b/sdk/src/main/java/io/radar/sdk/RadarForegroundService.kt @@ -2,6 +2,7 @@ package io.radar.sdk import android.app.* import android.content.Intent +import android.content.pm.ServiceInfo import android.graphics.Color import android.os.Build import android.os.Bundle @@ -94,7 +95,11 @@ class RadarForegroundService : Service() { logger.e("Error setting foreground service content intent", RadarLogType.SDK_EXCEPTION, e) } val notification = builder.build() - startForeground(id, notification) + if (Build.VERSION.SDK_INT >= 29) { + startForeground(id, notification, ServiceInfo.FOREGROUND_SERVICE_TYPE_LOCATION) + } else { + startForeground(id, notification) + } } override fun onBind(intent: Intent): IBinder? {