rahul
rahul

Reputation: 1115

For Notification : What is the difference between pendingIntent.cancel() and notificationManager.cancel(notification_id)

While doing the notification code, a doubt came in my mind. What is the difference between pendingIntent.cancel() and notificationManager.cancel(notification_id). I mean which one will clear the notification and what will the other one do?.

Upvotes: 0

Views: 91

Answers (1)

CommonsWare
CommonsWare

Reputation: 1007296

which one will clear the notification

cancel() on NotificationManager will remove the Notification.

what will the other one do?

It cancels the PendingIntent, so it no longer can be used.

Upvotes: 1

Related Questions