Skip to content

Commit

Permalink
Update project
Browse files Browse the repository at this point in the history
  • Loading branch information
tananaev committed Oct 21, 2022
1 parent a2b2c21 commit 745a852
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
12 changes: 6 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 32
compileSdkVersion 33

defaultConfig {
applicationId 'org.traccar.client'
buildConfigField 'boolean', 'HIDDEN_APP', 'false'
minSdkVersion 16
targetSdkVersion 32
versionCode 78
versionName '6.17'
targetSdkVersion 33
versionCode 79
versionName '6.18'
multiDexEnabled true
}
namespace 'org.traccar.client'
Expand Down Expand Up @@ -48,7 +48,7 @@ dependencies {
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.preference:preference-ktx:1.2.0'
implementation 'androidx.test:core-ktx:1.4.0'
implementation 'androidx.core:core-ktx:1.8.0'
implementation 'androidx.core:core-ktx:1.9.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.github.judemanutd:autostarter:1.1.0'
implementation('dev.doubledot.doki:library:0.0.1@aar') {
Expand All @@ -60,7 +60,7 @@ dependencies {
googleImplementation 'com.google.firebase:firebase-core'
googleImplementation 'com.google.firebase:firebase-analytics'
googleImplementation 'com.google.firebase:firebase-crashlytics'
googleImplementation 'com.google.android.gms:play-services-location:20.0.0'
googleImplementation 'com.google.android.gms:play-services-location:21.0.0'
googleImplementation 'com.google.android.play:core:1.10.3'
}

Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/org/traccar/client/PositionProvider.kt
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,14 @@ abstract class PositionProvider(
abstract fun requestSingleLocation()

protected fun processLocation(location: Location?) {
val lastLocation = this.lastLocation
if (location != null &&
(lastLocation == null || location.time - lastLocation!!.time >= interval || distance > 0
&& location.distanceTo(lastLocation) >= distance || angle > 0
&& abs(location.bearing - lastLocation!!.bearing) >= angle)
) {
Log.i(TAG, "location new")
lastLocation = location
this.lastLocation = location
listener.onPositionUpdate(Position(deviceId, location, getBatteryStatus(context)))
} else {
Log.i(TAG, if (location != null) "location ignored" else "location nil")
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
buildscript {
ext.kotlin_version = '1.7.0'
ext.kotlin_version = '1.7.20'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath 'com.google.gms:google-services:4.3.13'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.1'
classpath 'com.android.tools.build:gradle:7.3.1'
classpath 'com.google.gms:google-services:4.3.14'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip

0 comments on commit 745a852

Please sign in to comment.