Problems with notification
I have developed an application that shows a notification when a new update is received from the server.
When an update comes from the server, I can see the generated new notification in the device notification area.
The problem I'm running into is that the notification time is updated every time it is shown.
- Is there a way to know if there is already an App Notification?
- I want to restore a notification if it doesn't exist
I did R&D but didn't get any way to get the existing notifications that are in the notification area of the device.
source to share
To set up a notification so that it can be updated, enter it with the notification ID by calling NotificationManager.notify(ID, notification).
To update this notification after it is released, update or create an object NotificationCompat.Builder
, create an object from it, Notification
and enter Notification
with the same ID you used earlier.
source to share