build: increase min api up to 26
This commit is contained in:
parent
515f950bde
commit
831b6bf491
@ -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"
|
||||||
|
@ -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 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user