[英]How to send a notification to a specific APNS notification token using Azure Notification Hub
我目前正在使用以下代码,它使用可枚举标签参数中指定的标签发送到所有设备。 但是,我想发送到具有特定通知令牌的设备。 下面的工作,但我找不到只需要 APNS 令牌的重载?
NotificationService.Instance.Hub.SendAppleNativeNotificationAsync(jsonPayload, userTag);
要发送到特定句柄(在本例中为 APNS 令牌),您可以使用“SendDirectNotificationAsync”,它并不特定于 Apple、Windows 或 FCM,因为在框架下知道,因为在句柄注册期间您会指定平台. 签名如下:
SendDirectNotificationAsync (Notification notification,
string deviceHandle, CancellationToken cancellationToken);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.