PushNotificationChannelManagerForUser.CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(IBuffer, String) |
Creates an object bound to a specified app through which you retrieve a push notification channel from Windows Push Notification Services (WNS). The specified app must be in the same package as the calling app. |
CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(IBuffer, String, String) |
Creates an object bound to a specified app through which you retrieve a push notification channel from Windows Push Notification Services (WNS). The specified app must be in the same package as the calling app. |
CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(IBuffer, String)
Creates an object bound to a specified app through which you retrieve a push notification channel from Windows Push Notification Services (WNS). The specified app must be in the same package as the calling app.
public:
virtual IAsyncOperation<PushNotificationChannel ^> ^ CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(IBuffer ^ appServerKey, Platform::String ^ channelId) = CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync;
/// [Windows.Foundation.Metadata.Overload("CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<PushNotificationChannel> CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(IBuffer const& appServerKey, winrt::hstring const& channelId);
[Windows.Foundation.Metadata.Overload("CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<PushNotificationChannel> CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(IBuffer appServerKey, string channelId);
function createRawPushNotificationChannelWithAlternateKeyForApplicationAsync(appServerKey, channelId)
Public Function CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync (appServerKey As IBuffer, channelId As String) As IAsyncOperation(Of PushNotificationChannel)
Parameters
- appServerKey
- IBuffer
An uncompressed key in ANSI X9.62 format. This value is from the P-256 curve defined in the Secure Hash Standard specification.
- channelId
-
String
Platform::String
winrt::hstring
The ID of the push notification channel.
Returns
The object, bound to the app server specified in appServerKey, that is used to request a PushNotificationChannel from WNS.
- Attributes
Windows requirements
Device family |
Windows 10 Creators Update (introduced in 10.0.15063.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v4.0)
|
Remarks
Note that all raw notifications sent over this channel will have the channelID attached before being delivered to the app. This allows for apps to create multiple channels and differentiate where the notifications come from.
Applies to
CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(IBuffer, String, String)
Creates an object bound to a specified app through which you retrieve a push notification channel from Windows Push Notification Services (WNS). The specified app must be in the same package as the calling app.
public:
virtual IAsyncOperation<PushNotificationChannel ^> ^ CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(IBuffer ^ appServerKey, Platform::String ^ channelId, Platform::String ^ appId) = CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync;
/// [Windows.Foundation.Metadata.Overload("CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsyncWithId")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<PushNotificationChannel> CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(IBuffer const& appServerKey, winrt::hstring const& channelId, winrt::hstring const& appId);
[Windows.Foundation.Metadata.Overload("CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsyncWithId")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<PushNotificationChannel> CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(IBuffer appServerKey, string channelId, string appId);
function createRawPushNotificationChannelWithAlternateKeyForApplicationAsync(appServerKey, channelId, appId)
Public Function CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync (appServerKey As IBuffer, channelId As String, appId As String) As IAsyncOperation(Of PushNotificationChannel)
Parameters
- appServerKey
- IBuffer
An uncompressed key in ANSI X9.62 format. This value is from the P-256 curve defined in the Secure Hash Standard specification.
- channelId
-
String
Platform::String
winrt::hstring
The ID of the push notification channel.
- appId
-
String
Platform::String
winrt::hstring
The package-relative application identifier (PRAID) of the app to bind to the push notification channel. The specified app must be in the same package as the calling app. For more info on the PRAID, see the Id attribute of the Application element.
If you are hosting background task(s) in an out-of-process COM server, separate from your main application, then pass as the argument for applicationId
the PRAID of the application that defines the windows.backgroundTask
extension in its own package manifest.
Returns
The object, bound to the app server specified in appServerKey, that is used to request a PushNotificationChannel from WNS.
- Attributes
Windows requirements
Device family |
Windows 10 Creators Update (introduced in 10.0.15063.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v4.0)
|
Remarks
All raw notifications sent over this channel will have the channelID attached before being delivered to the app. This allows for apps to create multiple channels and differentiate where the notifications come from.
Note
Most applications (including all third party apps) should use the CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync without the appID parameter.