Revert NotificationService to keep notification in API23

This commit is contained in:
J-Jamet
2020-05-21 11:39:17 +02:00
parent e33c9b932f
commit 76ecbd3497

View File

@@ -24,7 +24,9 @@ abstract class NotificationService : Service() {
return null
}
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
override fun onCreate() {
super.onCreate()
notificationManager = NotificationManagerCompat.from(this)
// Create notification channel for Oreo+
@@ -46,8 +48,6 @@ abstract class NotificationService : Service() {
val theme = theme
theme.resolveAttribute(R.attr.colorPrimary, typedValue, true)
colorNotificationAccent = typedValue.data
return super.onStartCommand(intent, flags, startId)
}
protected fun buildNewNotification(): NotificationCompat.Builder {