Disable badge in API 26 and 27

This commit is contained in:
birdbird 2022-08-04 07:20:02 +02:00 committed by GitHub
parent 26c8478de6
commit 22efef2dea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -508,6 +508,9 @@ public class DefaultMediaNotificationProvider implements MediaNotification.Provi
channelId,
context.getString(channelNameResourceId),
NotificationManager.IMPORTANCE_LOW);
if (Util.SDK_INT == 26 || Util.SDK_INT == 27) {
channel.setShowBadge(false);
}
notificationManager.createNotificationChannel(channel);
}