简体   繁体   中英

How to send tile notification with parameters using push sharp in windows phone 8

I am sending notifications to Windows Phone 8 using Push Sharp.

Using these notifications I want to update the Webportal URL which my app is using, if it is changed to some other URL.

Firstly I tried it using toast notifications and was able to send a new web portal URL in .WithParameter("UpdatedWebUrl","www.newwebprotalurl.com") and could update it in my app. But the problem with toast notification is that it disappears after 10 sec . So there are chances that user might miss the notification and I have searched a lot about overriding toast notification duration, with no success.

Secondly I tried it using Tile notification. I was able to send Tile notification and tile was getting updated. But was not able to find a way to send any parameter/values with this.

So want to ask :

  • How to decide duration of toast notification using push sharp? It should be there until user dismisses it. Is there any way to know whether user has tapped on the notification or not, so that server may send notification again till the time user taps on it.
  • If 1st one is not possible then how to send tile notification with parameters using Push Sharp?

Any suggestions with documentation will be really helpful. Thanks.

What you can do is send an acknowledgment to your server when the user taps the toast notification (that acknowledgment is not part of MPNS, you'll have to directly call your server when the app is opened after the notification is tapped). This will let your server know the user tapped it. If you don't get an acknowledgment, you can resend the message. However, it's possible the user won't look at the device for hours, so I'm not sure you really want to resend the notification every 10 seconds until you get an acknowledgment (if you are not using an authenticated web service to send the notifications, you'll be throttled very soon).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM