You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.
When receiving a notification in the foreground, the platforms behave as followed:
Android: Dispatch 'notification' event.
iOS: Dispatch 'notification' event.
Windows: Dispatch 'notification event'. Show toast notification.
Unlike Android and iOS, Windows does show a system notification even if it is handled. This essentially means that the notification can be fired twice, and that can and will break assumptions. In the spirit of normalizing the differences between the platforms, I propose a change to stop the toast notification when handling a foreground notification on the Windows platform.
Change:
var onNotificationReceived = function (e) {
var result = createNotificationJSON(e);
onSuccess(result, { keepCallback: true });
}
To:
var onNotificationReceived = function (e) {
var result = createNotificationJSON(e);
onSuccess(result, { keepCallback: true });
e.cancel = true;
}
Thanks for the detailed issue. Though you make a valid point, but by doing so we will be kicking away the default handling of the notifications by the windows OS, which most of the users might prefer rather than implementing it on their own. As you have already mentioned, the users who want to achieve that can do so by setting the cancel property to true.
When receiving a notification in the foreground, the platforms behave as followed:
Unlike Android and iOS, Windows does show a system notification even if it is handled. This essentially means that the notification can be fired twice, and that can and will break assumptions. In the spirit of normalizing the differences between the platforms, I propose a change to stop the toast notification when handling a foreground notification on the Windows platform.
Change:
To:
On https://github.com/phonegap/phonegap-plugin-push/blob/master/src/windows/PushPluginProxy.js#L53
The text was updated successfully, but these errors were encountered: