dor506
dor506

Reputation: 5404

Is there a way to detect if the notification bar has been cleared?

I want to be notified when the user cleared the noficiation bar (clicked on "clear" button).

i mean to that button:

enter image description here

Is there a way to do that? by broadcast or something?

thanks in advance

Upvotes: 4

Views: 830

Answers (1)

CommonsWare
CommonsWare

Reputation: 1006724

For your own notifications, use deleteIntent to specify a PendingIntent to be executed when the user clears your notification.

However, you cannot find out whether that button has been pressed in general, for other notifications than your own.

Upvotes: 4

Related Questions