服务端SDK极光发送用户无感知的静默消息疑问
if (StringUtils.isEmpty(jpushMessage.getMessageContent())){
iosNotificationBuilder.setContentAvailable(true);
iosNotificationBuilder.disableBadge();
iosNotificationBuilder.disableSound();
androidNotificationBuilder.setAlertType(0);
}else {
if (jpushMessage.getBadge() != null) {
iosNotificationBuilder.setBadge(jpushMessage.getBadge());
}
}
payloadBuilder.setNotification(Notification.newBuilder().
addPlatformNotification(iosNotificationBuilder.build())
.addPlatformNotification(androidNotificationBuilder.build()).setAlert(jpushMessage.getMessageContent()).build());
我按照rest api里面的参数介绍, 和极光控台发送静默消息的条件在代码中如下设置, 发送的时候依然会有提示,切返回的responsebody中badge有值且为0,
能不能告知正确的发送姿势,急