ToastNotificationHistory
ToastNotificationHistory
ToastNotificationHistory
ToastNotificationHistory
Class
Definition
Manages the toast notifications for an app including the ability the clear all toast history and removing individual toasts.
public : sealed class ToastNotificationHistory : IToastNotificationHistory, IToastNotificationHistory2public sealed class ToastNotificationHistory : IToastNotificationHistory, IToastNotificationHistory2Public NotInheritable Class ToastNotificationHistory Implements IToastNotificationHistory, IToastNotificationHistory2// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Methods
Clear() Clear() Clear() Clear()
Removes all notifications sent by this app from action center.
public : void Clear()public void Clear()Public Function Clear() As void// You can use this method in JavaScript.
- See Also
Clear(String) Clear(String) Clear(String) Clear(String)
Removes all notifications from action center that were sent by another app inside the same app package.
public : void Clear(PlatForm::String applicationId)public void Clear(String applicationId)Public Function Clear(applicationId As String) As void// You can use this method in JavaScript.
- applicationId
- PlatForm::String String String String
The ID of the app inside the app package whose notifications are to be deleted.
- See Also
GetHistory() GetHistory() GetHistory() GetHistory()
Gets notification history, for all notifications sent by this app, from action center.
public : IVectorView<ToastNotification> GetHistory()public IReadOnlyList<ToastNotification> GetHistory()Public Function GetHistory() As IReadOnlyList( Of ToastNotification )// You can use this method in JavaScript.
A collection of toasts.
- See Also
GetHistory(String) GetHistory(String) GetHistory(String) GetHistory(String)
Gets notification history, for a toast with the specified tag label, from action center.
public : IVectorView<ToastNotification> GetHistory(PlatForm::String applicationId)public IReadOnlyList<ToastNotification> GetHistory(String applicationId)Public Function GetHistory(applicationId As String) As IReadOnlyList( Of ToastNotification )// You can use this method in JavaScript.
- applicationId
- PlatForm::String String String String
The tag label for the toast being queried-for.
A collection of toasts.
- See Also
Remove(String) Remove(String) Remove(String) Remove(String)
Removes an individual toast, with the specified tag label, from action center.
public : void Remove(PlatForm::String tag)public void Remove(String tag)Public Function Remove(tag As String) As void// You can use this method in JavaScript.
- tag
- PlatForm::String String String String
The tag label of the toast notification to be removed.
Remarks
You should use this overload to remove notifications when your app's toast notification categorization system was built using only tags.
- See Also
Remove(String, String) Remove(String, String) Remove(String, String) Remove(String, String)
Removes a toast notification from the action using the notification's tag and group labels.
public : void Remove(PlatForm::String tag, PlatForm::String group)public void Remove(String tag, String group)Public Function Remove(tag As String, group As String) As void// You can use this method in JavaScript.
- tag
- PlatForm::String String String String
The tag label of the toast notification to be removed.
- group
- PlatForm::String String String String
The group label of the toast notification to be removed.
Remarks
You should use this overload to remove notifications when your app's toast notification categorization system was built using tags and groups.
- See Also
Remove(String, String, String) Remove(String, String, String) Remove(String, String, String) Remove(String, String, String)
Removes an individual toast notification from action center, identified by the combination of tag label, group label and app ID.
public : void Remove(PlatForm::String tag, PlatForm::String group, PlatForm::String applicationId)public void Remove(String tag, String group, String applicationId)Public Function Remove(tag As String, group As String, applicationId As String) As void// You can use this method in JavaScript.
- tag
- PlatForm::String String String String
The tag label of the toast notification to be removed.
- group
- PlatForm::String String String String
The group label of the toast notification to be removed.
- applicationId
- PlatForm::String String String String
The app ID of the app that sent the specified toast notification. This app must be part of the same app package as the app making this remove request.
Remarks
You should use this overload to remove notifications for a specific app in your app package, as specified by the applicationId parameter. If your app only uses tags, you can pass in an empty string for the group parameter.
- See Also
RemoveGroup(String) RemoveGroup(String) RemoveGroup(String) RemoveGroup(String)
Removes a group of toast notifications, identified by the specified group label, from action center.
public : void RemoveGroup(PlatForm::String group)public void RemoveGroup(String group)Public Function RemoveGroup(group As String) As void// You can use this method in JavaScript.
- group
- PlatForm::String String String String
The group label of the toast notifications to be removed.
- See Also
RemoveGroup(String, String) RemoveGroup(String, String) RemoveGroup(String, String) RemoveGroup(String, String)
Removes a group of toast notifications sent by the another app inside the same app package from action center using the group label.
public : void RemoveGroup(PlatForm::String group, PlatForm::String applicationId)public void RemoveGroup(String group, String applicationId)Public Function RemoveGroup(group As String, applicationId As String) As void// You can use this method in JavaScript.
- group
- PlatForm::String String String String
The group label of the toast notifications to be removed.
- applicationId
- PlatForm::String String String String
The app ID of the app within the same app package of the calling app.
- See Also