Commit b631357f authored by wanglei's avatar wanglei Committed by songjianyu

[修改]常驻通知栏不用计入通知小红点

parent e654049e
...@@ -90,11 +90,13 @@ object StayNotification { ...@@ -90,11 +90,13 @@ object StayNotification {
builder.setCustomContentView(contentView) builder.setCustomContentView(contentView)
builder.setCustomBigContentView(expendView) builder.setCustomBigContentView(expendView)
builder.setCustomHeadsUpContentView(expendView) builder.setCustomHeadsUpContentView(expendView)
builder.setNumber(0)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val channel = val channel =
NotificationChannel(channelId, channelName, NotificationManager.IMPORTANCE_LOW) NotificationChannel(channelId, channelName, NotificationManager.IMPORTANCE_LOW)
channel.lockscreenVisibility = 1 channel.lockscreenVisibility = 1
channel.setShowBadge(false)
val notificationManager = val notificationManager =
context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
notificationManager.createNotificationChannel(channel) notificationManager.createNotificationChannel(channel)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment