Android: Grouped notifications and summary still shown separately on 4.4 and below

后端 未结 2 630
北荒
北荒 2020-12-28 12:40

I want to implement stacked notifications on Android Wear To do that I create 1 summary notification and N individual notifications for each \"item\". I want only the summar

相关标签:
2条回答
  • 2020-12-28 13:13

    Fixed this by using

    NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this);
    

    instead of

    NotificationManager notificationManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
    

    and replacing NotificationManager with NotificationManagerCompat in corresponding method signatures.

    0 讨论(0)
  • 2020-12-28 13:21

    You Just Remove showSingleNotification method and replace

    notificationManager.notify(123456, notification); 
    

    with

    notificationManager.notify(123456, builder); 
    

    and its work fine.

    0 讨论(0)
提交回复
热议问题