NotificationHubClient.SendDirectNotificationAsync Method

Definition

Overloads

SendDirectNotificationAsync(Notification, IList<String>)

Sends a notification directly to all devices listed in deviceHandles (a valid tokens as expressed by the Notification type). Users of this API do not use Registrations or Installations. Instead, users of this API manage all devices on their own and use Azure Notification Hub solely as a pass through service to communicate with the various Push Notification Services.

SendDirectNotificationAsync(Notification, String)

Sends a notification directly to a deviceHandle (a valid token as expressed by the Notification type). Users of this API do not use Registrations or Installations. Instead, users of this API manage all devices on their own and use Azure Notification Hub solely as a pass through service to communicate with the various Push Notification Services.

SendDirectNotificationAsync(Notification, IList<String>)

Sends a notification directly to all devices listed in deviceHandles (a valid tokens as expressed by the Notification type). Users of this API do not use Registrations or Installations. Instead, users of this API manage all devices on their own and use Azure Notification Hub solely as a pass through service to communicate with the various Push Notification Services.

public System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome> SendDirectNotificationAsync (Microsoft.Azure.NotificationHubs.Notification notification, System.Collections.Generic.IList<string> deviceHandles);
member this.SendDirectNotificationAsync : Microsoft.Azure.NotificationHubs.Notification * System.Collections.Generic.IList<string> -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>

Parameters

notification
Notification

A instance of a Notification, identifying which Push Notification Service to send to.

deviceHandles
IList<String>

A list of valid device identifiers.

Returns

Exceptions

Thrown when notification or deviceHandles object is null

SendDirectNotificationAsync(Notification, String)

Sends a notification directly to a deviceHandle (a valid token as expressed by the Notification type). Users of this API do not use Registrations or Installations. Instead, users of this API manage all devices on their own and use Azure Notification Hub solely as a pass through service to communicate with the various Push Notification Services.

public System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome> SendDirectNotificationAsync (Microsoft.Azure.NotificationHubs.Notification notification, string deviceHandle);
member this.SendDirectNotificationAsync : Microsoft.Azure.NotificationHubs.Notification * string -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>

Parameters

notification
Notification

A instance of a Notification, identifying which Push Notification Service to send to.

deviceHandle
String

A valid device identifier.

Returns

Exceptions

Thrown when notification or deviceHandle object is null

Applies to