首页 > 解决方案 > 如何使用 Azure sdk 在通知上添加声音

问题描述

有谁知道如何使用 Java 上的 Azure 通知中心添加声音。

我所做的是:

添加了依赖:

<dependency>
    <groupId>com.windowsazure</groupId>
    <artifactId>NotificationHubs</artifactId>
    <version>0.0.5</version>
</dependency>

并按照文档说明发送通知:

            INotificationHub hub = new NotificationHub("connectionString", "hubPath"); 
            Notification n = Notification.createGcmNotification(message);
            Set<String> tags = new HashSet<>();
            tags.add(tag);
            hub.sendNotification(n, tags);

我正在寻找如何添加声音,但我可以找到它。

我打算向 iOS 和 Android 客户端发送通知。

先感谢您。

标签: javaazureaudioazure-notificationhub

解决方案


有谁知道如何使用 Java 上的 Azure 通知中心添加声音。

不幸的是,Azure 通知中心目前不支持它。我还找到了一个类似的MSDN 线程

您可以将您的反馈反馈给azure team

如果你还想这样做。我的解决方法是您可以参考APNSGCM。另请注意播放负载的大小限制。

参考:

更改推送通知声音


推荐阅读