xamarin-plugins icon indicating copy to clipboard operation
xamarin-plugins copied to clipboard

PendingIntent Extras are not updated

Open Knordy opened this issue 8 years ago • 5 comments

For now we use this plugin as followed: We send out notifications to a device, but only one notification is displayed:

[ ] [Notification Title] [ ] [notification text]

if a new notification is send, the title and text are replaced. If I'm correct this is default behavior because the same notificationId is used. But every notification has it's own Extras, which contains information to redirect the app to a certain page. This all works if the user receives a notification, taps it and is redirected to the page that is related to the notification. If another notification is received and is tapped again, again it redirects to a related page.

But if a notification is received, but it is dismissed (swiped), or is just ignored, and another notification is received the notification text (contents) are updated, but it still uses the extra's from the first notification.

In this case I believe we need an additional PendingIntent Flag: PendingIntentFlags.UpdateCurrent for the resultPendingIntent, next to the PendingIntentFlags.OneShot

Knordy avatar Aug 30 '16 08:08 Knordy

Thanks for the fix. Will test to see if it fixes the issue. This hasn't been released to a new nuget package yet, am I correct? (we're on version 1.2.4)

Knordy avatar Sep 12 '16 08:09 Knordy

Yes hasn't been release need to test it.

rdelrosario avatar Sep 15 '16 04:09 rdelrosario

@rdelrosario any updates on this? It's quite important.

sboutsis avatar Apr 07 '17 05:04 sboutsis

Please try this prerelease: https://www.nuget.org/packages/Xam.Plugin.PushNotification/1.2.5-beta

Let me know if issue is fixed for you here.

rdelrosario avatar Apr 14 '17 15:04 rdelrosario

I've tested it and my described issue is resolved. Thanks.

Knordy avatar Jul 25 '17 14:07 Knordy