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

时间秒杀一切 提交于 2019-11-30 03:10:50

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.

user11834696

You Just Remove showSingleNotification method and replace

notificationManager.notify(123456, notification); 

with

notificationManager.notify(123456, builder); 

and its work fine.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!