Markus Hütter
Markus Hütter

Reputation: 7906

how to update notification in universal windows

I've been trying to figure out how I can manipulate a ToastNotification after it is being shown, but it seems its XML is fixed then. If ToastNotification is not the right tool for that, what is?

I'm trying to have a timer update in a notification, e.g. like the progress of a playing song...

Upvotes: 2

Views: 1133

Answers (1)

Stefan Over
Stefan Over

Reputation: 6066

A toast notification ain't be the right solution for your use case.
Let's begin with the Guidelines for toast notifications. Microsoft recommends the following (excerpt of important points for this question) for toast notifications:

  • Hide notifications if they are no longer valid. For example, hide a toast about an incoming call if the other party has hung up or the user has already answered on another device. Note that you can only hide notifications when your app is running.

In your use case, old information won't be valid any longer, once the percentage changes. You should hide those notifications instead.
On the other side, we have this point:

  • Don't hide toast notifications unless absolutely necessary.

The user should be able to handle existing toast notifications. You app should not handle the clean up of existing notifications!

  • Don't notify the user of something they didn't ask to be notified about. For instance, don't assume that all users want to be notified each time one of their contacts appears online.

Keep in mind, that sending a new notification will always pop up a new window. Most users might be annoyed after a short period of time. Give your users the possibility to opt-in this notifications, and on which level (start and end, update each 10%, update each 5%, only end):

  • Don't use toast notifications for anything with a high volume of notifications, such as stock price information.

Giving the user high update rates will annoy him even more.

Last but not least, provide alternatives:

  • Provide alternate ways for users to get the info provided in a toast if it's important. For example, you may want to display related information on your app's live tile or within your app.

Let's continue with the Guidelines for tiles and badges. Microsoft states some recommendations here, too. But taking a look at the most critical might be helpful:

How often should your tile update?

If you choose to use a live tile, consider how often the tile should be updated.

For personalized content, such as message counts or whose turn it is in a game, we recommend that you update the tile as the information becomes available, particularly if the user would notice that the tile content was lagging, incorrect, or missing. For nonpersonalized content, such as weather updates, we recommend that the tile be updated no more than once every 30 minutes. This allows your tile to feel up-to-date without overwhelming your user.

This 30 minute range is way to long for live updates of your use case.

IMHO: Use immutable toast notifications for Upload finished, Song finished and so on. But give the user the option to opt-in this notification feature.
For live updates (actual percentage), your user should be inside your app and receive the updates there.

Upvotes: 3

Related Questions