xamarin-plugins
xamarin-plugins copied to clipboard
PendingIntent Extras are not updated
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
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)
Yes hasn't been release need to test it.
@rdelrosario any updates on this? It's quite important.
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.
I've tested it and my described issue is resolved. Thanks.