Update project
Этот коммит содержится в:
@@ -2,15 +2,15 @@ apply plugin: 'com.android.application'
|
|||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 32
|
compileSdkVersion 33
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId 'org.traccar.client'
|
applicationId 'org.traccar.client'
|
||||||
buildConfigField 'boolean', 'HIDDEN_APP', 'false'
|
buildConfigField 'boolean', 'HIDDEN_APP', 'false'
|
||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 32
|
targetSdkVersion 33
|
||||||
versionCode 78
|
versionCode 79
|
||||||
versionName '6.17'
|
versionName '6.18'
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
}
|
}
|
||||||
namespace 'org.traccar.client'
|
namespace 'org.traccar.client'
|
||||||
@@ -48,7 +48,7 @@ dependencies {
|
|||||||
implementation 'androidx.multidex:multidex:2.0.1'
|
implementation 'androidx.multidex:multidex:2.0.1'
|
||||||
implementation 'androidx.preference:preference-ktx:1.2.0'
|
implementation 'androidx.preference:preference-ktx:1.2.0'
|
||||||
implementation 'androidx.test:core-ktx:1.4.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 "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||||
implementation 'com.github.judemanutd:autostarter:1.1.0'
|
implementation 'com.github.judemanutd:autostarter:1.1.0'
|
||||||
implementation('dev.doubledot.doki:library:0.0.1@aar') {
|
implementation('dev.doubledot.doki:library:0.0.1@aar') {
|
||||||
@@ -60,7 +60,7 @@ dependencies {
|
|||||||
googleImplementation 'com.google.firebase:firebase-core'
|
googleImplementation 'com.google.firebase:firebase-core'
|
||||||
googleImplementation 'com.google.firebase:firebase-analytics'
|
googleImplementation 'com.google.firebase:firebase-analytics'
|
||||||
googleImplementation 'com.google.firebase:firebase-crashlytics'
|
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'
|
googleImplementation 'com.google.android.play:core:1.10.3'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,13 +47,14 @@ abstract class PositionProvider(
|
|||||||
abstract fun requestSingleLocation()
|
abstract fun requestSingleLocation()
|
||||||
|
|
||||||
protected fun processLocation(location: Location?) {
|
protected fun processLocation(location: Location?) {
|
||||||
|
val lastLocation = this.lastLocation
|
||||||
if (location != null &&
|
if (location != null &&
|
||||||
(lastLocation == null || location.time - lastLocation!!.time >= interval || distance > 0
|
(lastLocation == null || location.time - lastLocation!!.time >= interval || distance > 0
|
||||||
&& location.distanceTo(lastLocation) >= distance || angle > 0
|
&& location.distanceTo(lastLocation) >= distance || angle > 0
|
||||||
&& abs(location.bearing - lastLocation!!.bearing) >= angle)
|
&& abs(location.bearing - lastLocation!!.bearing) >= angle)
|
||||||
) {
|
) {
|
||||||
Log.i(TAG, "location new")
|
Log.i(TAG, "location new")
|
||||||
lastLocation = location
|
this.lastLocation = location
|
||||||
listener.onPositionUpdate(Position(deviceId, location, getBatteryStatus(context)))
|
listener.onPositionUpdate(Position(deviceId, location, getBatteryStatus(context)))
|
||||||
} else {
|
} else {
|
||||||
Log.i(TAG, if (location != null) "location ignored" else "location nil")
|
Log.i(TAG, if (location != null) "location ignored" else "location nil")
|
||||||
|
|||||||
+4
-4
@@ -1,13 +1,13 @@
|
|||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.7.0'
|
ext.kotlin_version = '1.7.20'
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:7.2.2'
|
classpath 'com.android.tools.build:gradle:7.3.1'
|
||||||
classpath 'com.google.gms:google-services:4.3.13'
|
classpath 'com.google.gms:google-services:4.3.14'
|
||||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.1'
|
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
|||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
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
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user