对于通知:pendingIntent.cancel() 和 notificationManager.cancel(notification_id) 有什么区别
For Notification : What is the difference between pendingIntent.cancel() and notificationManager.cancel(notification_id)
在做通知代码的时候,心里有个疑惑。 pendingIntent.cancel() 和 notificationManager.cancel(notification_id) 有什么区别。我的意思是哪个会清除通知,另一个会做什么?
which one will clear the notification
NotificationManager
上的 cancel()
将删除 Notification
。
what will the other one do?
取消了PendingIntent
,所以不能再使用
在做通知代码的时候,心里有个疑惑。 pendingIntent.cancel() 和 notificationManager.cancel(notification_id) 有什么区别。我的意思是哪个会清除通知,另一个会做什么?
which one will clear the notification
NotificationManager
上的 cancel()
将删除 Notification
。
what will the other one do?
取消了PendingIntent
,所以不能再使用