0

Fatal Exception: java.lang.SecurityException: Not allowed to delete channel 1250012 with a foreground service

我的代码在这里

val notificationMgnr =
                application.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
                notificationMgnr.deleteNotificationChannel(CHANNEL_ID)
            }
4

0 回答 0