How do I dedupe push notifications on Android?

Push notifications on Android show only the last notification content received(for triggered and manual messages). The reason for this behavior is that the message identifier is the Leanplum message ID and in this case it will be the same for all occurrences.


To ensure all instances of the notification are shown, you can add a custom key - lp_notificationId -  in the push payload with a random number. This will ensure uniqueness in the push instances and they won't override the content:


The jinja below generates a random number from 1 to 9999 for every notification:


Was this article helpful?
Have more questions? Submit a request