关于JAVA SDK设置groupKey的问题

didyqian
2019-09-09 08:41 142 0

请问用JAVA SDK的话,从appKey改成groupKey是调用不同的方法吗?在API上没找到。
现在的代码如下:

final JPushClient jpushClient = new JPushClient(JpushMasterSecret,jpushAppKey,null, clientConfig);
        final PushPayload payload = PushPayload.newBuilder()
            .setPlatform(Platform.all())
            .setAudience(Audience.alias(mobile))
//            .setAudience(Audience.all())
            .setOptions(Options.newBuilder().setApnsProduction(true).build())
            .setNotification(Notification.newBuilder().setAlert(text).
                addPlatformNotification(AndroidNotification.newBuilder().setTitle(title).addExtras(exras).build())
                .addPlatformNotification(IosNotification.newBuilder().addExtras(exras).build()).build())
            .build();
        try {
            PushResult result = jpushClient.sendPush(payload);
            LOG.info("Got result - " + result);
        };

1个回答

热门排序
  • 参考examplehttps://github.com/jpush/jpush-api-java-client/blob/master/example/main/java/cn/jpush/api/examples/PushExample. 展示全部