Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ group 'com.icapps.background_location_tracker'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.9.10'
ext.kotlin_version = '2.1.10'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:8.3.2'
classpath 'com.android.tools.build:gradle:8.9.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fun MethodCall.checkRequiredFields(keys: Iterable<String>, result: MethodChannel

keys.forEach {
if (!hasArgument(it)) {
sb.appendln("$it not found, but required")
sb.appendLine("$it not found, but required")
}
}
if (sb.isEmpty()) return true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,10 @@ internal class LocationUpdatesService : Service() {
private fun createLocationRequest() {
val interval = SharedPrefsUtil.trackingInterval(this)
val distanceFilter = SharedPrefsUtil.distanceFilter(this)
locationRequest = LocationRequest.create()
.setInterval(interval)
.setFastestInterval(interval / 2)
.setPriority(Priority.PRIORITY_HIGH_ACCURACY)
.setSmallestDisplacement(distanceFilter)
locationRequest = LocationRequest.Builder(Priority.PRIORITY_HIGH_ACCURACY, interval)
.setMinUpdateIntervalMillis(interval / 2)
.setMinUpdateDistanceMeters(distanceFilter)
.build()
}

/**
Expand Down