1
0

build: increase min api up to 26

This commit is contained in:
Sweetbread 2025-05-23 11:54:42 +03:00
parent 515f950bde
commit 831b6bf491
Signed by: Sweetbread
GPG Key ID: 17A5CB9A7DD85319
2 changed files with 8 additions and 10 deletions

View File

@ -15,7 +15,7 @@ android {
defaultConfig { defaultConfig {
applicationId = "ru.risdeveau.geotracker" applicationId = "ru.risdeveau.geotracker"
minSdk = 24 minSdk = 26
targetSdk = 35 targetSdk = 35
versionCode = 2 versionCode = 2
versionName = "1.1" versionName = "1.1"

View File

@ -70,15 +70,13 @@ class LocationForegroundService : Service() {
private fun createNotificationChannel() { private fun createNotificationChannel() {
Log.d("Service", "createNotificationChannel") Log.d("Service", "createNotificationChannel")
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { val channel = NotificationChannel(
val channel = NotificationChannel( "location_channel",
"location_channel", "Отправка Местоположения",
"Отправка Местоположения", NotificationManager.IMPORTANCE_HIGH
NotificationManager.IMPORTANCE_HIGH )
) val manager = getSystemService(NOTIFICATION_SERVICE) as NotificationManager
val manager = getSystemService(NOTIFICATION_SERVICE) as NotificationManager manager.createNotificationChannel(channel)
manager.createNotificationChannel(channel)
}
} }
private fun createNotification(): Notification { private fun createNotification(): Notification {