0

What is the payload to send push notification to Windows 10 (mobile) devices without showing a message to the user (silent push)? All i need to deliver within the push is a custom parameter.

Nikita R.
  • 7,245
  • 3
  • 51
  • 62
Uwe Becker
  • 123
  • 7

1 Answers1

0

Check out whether X-WNS-SuppressPopup header in Push notification service request and response headers works for you:

X-WNS-SuppressPopup

For Windows Phone Store apps, you have the option to suppress a toast notification's UI, instead sending the notification directly to the action center. This lets your notification be delivered silently, a potentially superior option for less urgent notifications. This header is optional and only used on Windows Phone channels. If you include this header on a Windows channel, your notification will be dropped and you will receive an error response from WNS.

Community
  • 1
  • 1
Nikita R.
  • 7,245
  • 3
  • 51
  • 62
  • Hi Nikita, that's not working. Is this for Windows Phone 8(.1) only? – Uwe Becker Mar 01 '17 at 15:18
  • It should be the same for W10 I think because the post I referenced is directly linked from [Windows Push Notification Services (WNS) overview](https://learn.microsoft.com/en-us/windows/uwp/controls-and-patterns/tiles-and-notifications-windows-push-notification-services--wns--overview) which was written/updated in Feb 2017 and explicitely mentions Windows 10 as a supported platform. Does the same push work if you remove the `X-WNS-SuppressPopup` header? – Nikita R. Mar 01 '17 at 17:00
  • I still get a (visible) notification message using this header attribute. This is my code for the template: `Dictionary headerSilent = new Dictionary { { "X-WNS-Type", "wns/toast" } , { "X-WNS-SuppressPopup", "true" } }; var toastSilent = new XElement("binding", new XElement("text", "$(idParam)")) .ToString(SaveOptions.DisableFormatting); var templateSilent = new InstallationTemplate(); templateSilent.Body = toastSilent; templateSilent.Headers = headerSilent;` **This header is optional and used for Windows Phone channels only.** – Uwe Becker Mar 01 '17 at 20:51
  • do you get the same behavior both through Notification Hubs and if you try to send it directly using Windows SDK? If the later, then it means that Notification Hubs doesn't have anything to do with it. I'd recommend adding WNS (or whatever it's called) tag to the post and maybe someone either from the product team or who knows more about WNS-specifics could respond. – Nikita R. Mar 02 '17 at 00:34