NotificationCompat v7 and Android O

I am having problems with NotificationCompat v7 and Android O. Since the NotificationCompatV7 implementation only implements the outdated constructor ( deprecated in the support library 26.0.0-beta1 ) of version v4, I was not able to receive work notifications.

A solution for NotificationCompat v4 was proposed here: NotificationCompat with API 26

but since this problem is due to poor implementation of v7 version ( https://issuetracker.google.com/issues/62475846 ), I can not send notifications on Android O

Does anyone have a solution for this or am I missing something here?

+4
source share
1

NotificationCompat v7 , NotificationCompat v4 ( NotificationCompat v7).

/**
 * @deprecated Use the static classes in {@link android.support.v4.app.NotificationCompat}.
 */

(Kotlin):

val notificationBuilder = NotificationCompat.Builder(context, "your_notification_channel_name")                     
.setContentTitle("title")
[...]

. - "com.android.support:appcompat-v7:26.0.0"

+8

Source: https://habr.com/ru/post/1680216/


All Articles