501 - not implemented
501 - not implemented

Reputation: 2688

Can i switch a title of a action in a notification?

in my notificationbar i want to switch the title of a action, which I have add with the notification builder. is there a option to switch? I've tested the following code

 notification.addAction(R.drawable.ic_delete, isIgnored?"ignor":"accept", pendingIgnoreEventIntent);

but if i build the notification with .build(), only the text is displayed, which are set after the first build.

Has anyone an idea? greetings

Upvotes: 1

Views: 111

Answers (1)

Samuel
Samuel

Reputation: 17171

From the docs:

To set up a notification so it can be updated, issue it with a notification ID by calling NotificationManager.notify(ID, notification). To update this notification once you've issued it, update or create a NotificationCompat.Builder object, build a Notification object from it, and issue the Notification with the same ID you used previously. If the previous notification is still visible, the system updates it from the contents of the Notification object. If the previous notification has been dismissed, a new notification is created instead.

Upvotes: 1

Related Questions