My activity creates a couple of notifications.
Here's how I'm currently doing it, on different resultIntents:
PendingIntent resultPendingIntent =
PendingIntent.getActivity(
context,
0,
resultIntent,
PendingIntent.FLAG_UPDATE_CURRENT
);
Now, since a flag is compulsory, I'm forced to select from the four flags. What do I do if I want all of them to work independently, and the newer notification isn't affected by the previous one.
A solution was found here: here.
You've to use setAction on the intent to a unique value so that there will be no matching PendingIntents
Here's what I used:
setAction(Long.toString(System.currentTimeMillis()))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With