-api-id | -api-type | -api-device-family-note |
---|---|---|
M:Windows.UI.Notifications.ToastNotificationManager.CreateToastNotifier(System.String) |
winrt method |
xbox |
Creates and initializes a new instance of the ToastNotification, bound to a specified app, usually another app in the same package.
The unique ID of the app.
Note
You can't send a toast notification to a secondary tile, so this must be the ID of an app tile.
The object you will use to send the toast notification to the tile.
The app identified by applicationId must belong to the same package as the caller.
Use this form of the method if your app uses a background voice-over-Internet protocol (VOIP) agent, to specify the app ID required to show a toast in that case.
Generally, sending a toast notification from a desktop app is the same as sending it from a UWP app. However, you should be aware of these differences and requirements:
- For a desktop app to display a toast, the app must have a shortcut on the Start screen.
- The shortcut must have an AppUserModelID.
- Desktop apps cannot schedule a toast.
For more information, see these topics:
- How to enable desktop toast notifications through an AppUserModelID
- Quickstart: Sending a toast notification from the desktop
CreateToastNotifier, Toast notifications sample, Sending toast notifications from desktop apps sample, Toast XML schema, Toast notification overview, Quickstart: Sending a toast notification, Quickstart: Sending a toast push notification, Quickstart: Sending a toast notification from the desktop, Guidelines and checklist for toast notifications, How to handle activation from a toast notification, How to opt in for toast notifications, How to schedule a toast notification, How to enable desktop toast notifications through an AppUserModelID, The toast template catalog, Toast audio options