Reputation: 2688
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
Reputation: 17171
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