ToastNotificationManager.CreateToastNotifier(String) | createToastNotifier(String) method

Applies to Windows and Windows Phone

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.

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.

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:

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.UI.Notifications
Windows::UI::Notifications [C++]

Metadata

Windows.winmd

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

 

 

Show:
© 2014 Microsoft