John Smith
John Smith

Reputation: 2738

android notification id should be different each time or not

I am using notification in my app. I just wanna make sure that one thing, if i have only one type of notification and should I use the same id each time or what happens if i change id each time generate a notification?

mgrNotificationManager.notify(id, note);

Upvotes: 0

Views: 972

Answers (1)

fedepaol
fedepaol

Reputation: 6862

The doc says:

If a notification with the same id has already been posted by your application and has not yet been canceled, it will be replaced by the updated information.

So if you change the id every time, the system will handle that as a second notification.

Upvotes: 5

Related Questions