Guidelines for periodic notifications

Applies to Windows and Windows Phone

Periodic notifications update tiles and badges at a fixed time interval by polling a cloud service for new content. At the start of each polling interval, Windows sends a request to the service, downloads the content supplied by the service, and displays the fresh content on your app's tile. For more details, see Periodic notification overview. This topic provides guidelines for using periodic (or polled) notifications in your Windows Store app.

Should my app include periodic notifications?

Use periodic notifications if your app provides content that needs to be updated at regular, fixed intervals. For example, this notification type would be well-suited for:

  • A weather app that updates its live tile every 30 minutes to show the current forecast.
  • An app that shares a new daily deal with users every morning.

Keep in mind that periodic notifications can't be used with toast notifications. If you want to share pressing, time-sensitive alerts (like breaking news updates) or scheduled reminders with toasts, use push or scheduled notification options. For a comparison of the four available notification options (local, scheduled, push, and periodic), see Choosing a notification delivery method.

Dos and don'ts

General

  • Expire a periodic notification when it is no longer relevant. For examples, a special online offer that ends at midnight shouldn't be displayed after it has expired.
  • Request updates from the server no more than once every 30 minutes. This interval keeps your tile feeling up-to-date without overwhelming your user.
  • Feature notification content in a prominent place within your app, like the home or landing page. That way, when a user launches your app in response to a tile notification, he or she can easily find the content that initially attracted them.
  • Don't use periodic updates for content that user's expect to receive immediately, like breaking news reports. Use push notifications to deliver more time-sensitive updates.
  • Don't use periodic notifications to show ads on your live tile. Tiles should never display ads.

For recommendations on designing effective tiles and badges, see the Guidelines for tiles and badges.

Coding

  • Call the StartPeriodicUpdate or StartPeriodicUpdateBatch method each time your app is launched or brought into focus. This ensures that the tile content is updated each time the user launches or switches to your app.
  • Update the tile and badge XML content on your web service to match the polling frequency of your client. For instance, if your app's tile is set to poll at half-hour intervals, update the content on your web service every half an hour.
  • If your cloud service become unreachable or the user disconnects from the network for an extended period of time, remove outdated or irrelevant content from your tile. For example, a shopping deal that expires at midnight should set its expiration time to midnight. For more information on setting the expiration time, see the Periodic notification overview.
  • Use the startTime parameter in StartPeriodicUpdate or StartPeriodicUpdateBatch to cause the update to occur at a specific time of day. The startTime specifies the time of only the first poll, with subsequent polling being timed from that occurrence. Setting the startTime to 2:00 PM with a recurrence interval of 24 hours would ensure that updates will always happen at or soon after 2:00 each day.

Note  Tiles can cycle through up to five notifications at a given time. If there are five notifications in the queue, the next new notification replaces the oldest notification in the queue by default. However, if you use StartPeriodicUpdateBatch, your service can tag notifications with X-WNS-Tag HTTP response headers and modify the queue's replacement policy. If a new notification arrives with a tag that matches the tag on any of the five existing notifications in the queue, the new notification replaces the older notification with the matching tag (instead of automatically replacing the oldest notification). For more information on using tags and the notification queue, see How to use the notification queue with local notifications (HTML) or How to use the notification queue with local notifications (XAML).

Related topics

For designers
Periodic notification overview
Choosing a notification delivery method
Guidelines for tiles and badges
For developers (HTML)
Periodic notification overview
Quickstart: Setting up periodic notifications
How to use the notification queue with local notifications
For developers (XAML)
Periodic notification overview
How to set up periodic notifications
How to use the notification queue with local notifications
Sample
Push and periodic notifications client-side sample

 

 

Show:
© 2014 Microsoft