Creates and initializes a new instance of the ToastNotification, bound to a specified app, usually another app in the same package.
Syntax
var toastNotifier = Windows.UI.Notifications.ToastNotificationManager.createToastNotifier(applicationId);
Parameters
- applicationId
-
Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]
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.
Return value
Type: ToastNotifier
The object you will use to send the toast notification to the tile.
Remarks
The app identified by applicationId must belong to the same package as the caller.
Sending toast notifications from desktop apps
Generally, sending a toast notification from a desktop app is the same as sending it from a Windows Store 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
Requirements
|
Minimum supported client | Windows 8 |
|---|---|
|
Minimum supported server | Windows Server 2012 |
|
Namespace |
|
|
Metadata |
|
See also
- ToastNotificationManager
- 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
Build date: 12/4/2012