Android OneSignal setGroup null

时间:2017-04-03 18:38:58

标签: android onesignal

我尝试使用组密钥在Android上使用OneSignal堆叠通知。不幸的是我们无法将其设置为服务器端,因此我尝试使用NotificationExtenderService类中的setGroup()构建器选项将其设置为客户端:

    public class MyNotificationExtenderService extends NotificationExtenderService {

        @Override
        protected boolean onNotificationProcessing(final OSNotificationReceivedResult receivedResult) {
            OverrideSettings overrideSettings = new OverrideSettings();
            overrideSettings.extender = new NotificationCompat.Extender() {
                @Override
                public NotificationCompat.Builder extend(NotificationCompat.Builder builder) {

                    builder.setGroup("myGroup");
...

但是,这似乎不起作用,因为通知仍然是分开的,如果我尝试在NotificationOpenedHandler中获取组密钥,则它为null。任何人都知道如何正确堆叠OneSignal通知客户端?

0 个答案:

没有答案