Этот коммит содержится в:
Anton Tananaev
2022-12-10 15:33:10 -08:00
родитель ccd0a4caf3
Коммит f3d43ffbb0
5 изменённых файлов: 21 добавлений и 8 удалений
+5 -4
Просмотреть файл
@@ -8,8 +8,8 @@ android {
applicationId 'org.traccar.manager'
minSdkVersion 19
targetSdkVersion 33
versionCode 34
versionName '3.3'
versionCode 35
versionName '3.4'
multiDexEnabled true
}
namespace 'org.traccar.manager'
@@ -24,11 +24,12 @@ android {
}
dependencies {
implementation 'com.google.android.material:material:1.6.1'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0'
implementation 'androidx.preference:preference-ktx:1.2.0'
implementation 'androidx.core:core-ktx:1.8.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.biometric:biometric-ktx:1.2.0-alpha05'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
googleImplementation platform('com.google.firebase:firebase-bom:29.0.3')
+1
Просмотреть файл
@@ -6,6 +6,7 @@
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<application
android:name="androidx.multidex.MultiDexApplication"
+11
Просмотреть файл
@@ -123,6 +123,16 @@ class MainFragment : WebViewFragment() {
override fun onStart() {
super.onStart()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU &&
ContextCompat.checkSelfPermission(activity, Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED) {
if (!ActivityCompat.shouldShowRequestPermissionRationale(activity, Manifest.permission.POST_NOTIFICATIONS)) {
ActivityCompat.requestPermissions(
activity,
arrayOf(Manifest.permission.POST_NOTIFICATIONS),
REQUEST_PERMISSIONS_NOTIFICATION
)
}
}
broadcastManager.registerReceiver(tokenBroadcastReceiver, IntentFilter(EVENT_TOKEN))
broadcastManager.registerReceiver(eventIdBroadcastReceiver, IntentFilter(EVENT_EVENT))
}
@@ -258,6 +268,7 @@ class MainFragment : WebViewFragment() {
const val EVENT_EVENT = "eventEvent"
const val KEY_TOKEN = "keyToken"
private const val REQUEST_PERMISSIONS_LOCATION = 1
private const val REQUEST_PERMISSIONS_NOTIFICATION = 2
private const val REQUEST_FILE_CHOOSER = 1
}
}
+3 -3
Просмотреть файл
@@ -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.3.1'
classpath 'com.google.gms:google-services:4.3.13'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.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"
}
}
+1 -1
Просмотреть файл
@@ -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.5.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip