如何在通用 windows 中更新通知
how to update notification in universal windows
我一直在想办法在 ToastNotification
显示后如何对其进行操作,但它的 XML 似乎已被修复。如果 ToastNotification
不是正确的工具,那什么才是?
我正在尝试在通知中更新计时器,例如就像播放歌曲的进度...
吐司通知不是适合您的用例的解决方案。
让我们从 Guidelines for toast notifications 开始。 Microsoft 建议将以下内容(此问题的要点摘录)用于 toast 通知:
- 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.
在您的用例中,一旦百分比发生变化,旧信息将不再有效。您应该隐藏这些通知。
另一方面,我们有这样的观点:
- Don't hide toast notifications unless absolutely necessary.
用户应该能够处理现有的 Toast 通知。您的应用程序应该不处理现有通知的清理!
- 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.
请记住,发送新通知总是会弹出一个新的 window。大多数用户可能会在短时间后感到恼火。让您的用户可以选择加入此通知,以及在哪个级别(开始和结束,每 10% 更新一次,每 5% 更新一次,仅结束):
- Don't use toast notifications for anything with a high volume of notifications, such as stock price information.
给用户高更新率会更惹恼他。
最后但同样重要的是,提供替代方案:
- 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.
让我们继续Guidelines for tiles and badges。微软在这里也提出了一些建议。但看看最关键的可能会有帮助:
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.
这 30 分钟的范围对于您的用例的实时更新来说太长了。
恕我直言: 对 Upload finished
、Song finished
等使用不可变的 toast 通知。但是给用户选择加入这个通知功能的选项。
对于实时更新(实际百分比),您的用户应该在您的应用内并在那里接收更新。
我一直在想办法在 ToastNotification
显示后如何对其进行操作,但它的 XML 似乎已被修复。如果 ToastNotification
不是正确的工具,那什么才是?
我正在尝试在通知中更新计时器,例如就像播放歌曲的进度...
吐司通知不是适合您的用例的解决方案。
让我们从 Guidelines for toast notifications 开始。 Microsoft 建议将以下内容(此问题的要点摘录)用于 toast 通知:
- 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.
在您的用例中,一旦百分比发生变化,旧信息将不再有效。您应该隐藏这些通知。
另一方面,我们有这样的观点:
- Don't hide toast notifications unless absolutely necessary.
用户应该能够处理现有的 Toast 通知。您的应用程序应该不处理现有通知的清理!
- 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.
请记住,发送新通知总是会弹出一个新的 window。大多数用户可能会在短时间后感到恼火。让您的用户可以选择加入此通知,以及在哪个级别(开始和结束,每 10% 更新一次,每 5% 更新一次,仅结束):
- Don't use toast notifications for anything with a high volume of notifications, such as stock price information.
给用户高更新率会更惹恼他。
最后但同样重要的是,提供替代方案:
- 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.
让我们继续Guidelines for tiles and badges。微软在这里也提出了一些建议。但看看最关键的可能会有帮助:
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.
这 30 分钟的范围对于您的用例的实时更新来说太长了。
恕我直言: 对 Upload finished
、Song finished
等使用不可变的 toast 通知。但是给用户选择加入这个通知功能的选项。
对于实时更新(实际百分比),您的用户应该在您的应用内并在那里接收更新。