We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
public static void pushToSingleByCid02(String clientId,String title,String body,GeTuiCallBack callBack) { //根据cid进行单推 PushDTO pushDTO = new PushDTO(); // 设置推送参数 String requestId = NumberUtil.uuid(); pushDTO.setRequestId(requestId); PushMessage pushMessage = new PushMessage(); GTNotification notification = new GTNotification(); notification.setTitle(title); notification.setBody(body); //notification.setLogoUrl("https://url"); //notification.setLogo("push.png"); //notification.setClickType("url"); //notification.setUrl("https://www.getui.com"); notification.setClickType(CommonEnum.ClickTypeEnum.TYPE_NONE.type); pushMessage.setNotification(notification); pushDTO.setPushMessage(pushMessage); //设置消息离线时间 pushDTO.setSettings(new Settings()); pushDTO.getSettings().setTtl(3 * 24 * 3600 * 1000);
// 设置接收人信息 Audience audience = new Audience(); audience.addCid(clientId); pushDTO.setAudience(audience); // 进行cid单推 ApiResult<Map<String, Map<String, String>>> apiResult = getPushApi().pushToSingleByCid(pushDTO); if (apiResult.isSuccess()) { // success if(callBack!=null){ Map<String, Map<String, String>> map = apiResult.getData(); callBack.onSuccuss(map); } } else { // failed if(callBack!=null){ callBack.onFail(apiResult.getCode(),apiResult.getMsg()); } } }
搞不懂咋敏感了 String cid = beanGetui.getCid(); GeTuiHelper.pushToSingleByCid02(cid, "个推通知标题355", "个推通知消息主题内容", new GeTuiCallBack() { @OverRide public void onSuccuss(Map<String, Map<String, String>> map) { log.info(map.toString()); } @OverRide public void onFail(int code, String message) { log.info(message); } });
问题好像出在body字段,随便什么字符串都报敏感,换成json格式也不行,咋弄啊
The text was updated successfully, but these errors were encountered:
标题和内容请勿带 ”个推”
Sorry, something went wrong.
No branches or pull requests
public static void pushToSingleByCid02(String clientId,String title,String body,GeTuiCallBack callBack) {
//根据cid进行单推
PushDTO pushDTO = new PushDTO();
// 设置推送参数
String requestId = NumberUtil.uuid();
pushDTO.setRequestId(requestId);
PushMessage pushMessage = new PushMessage();
GTNotification notification = new GTNotification();
notification.setTitle(title);
notification.setBody(body);
//notification.setLogoUrl("https://url");
//notification.setLogo("push.png");
//notification.setClickType("url");
//notification.setUrl("https://www.getui.com");
notification.setClickType(CommonEnum.ClickTypeEnum.TYPE_NONE.type);
pushMessage.setNotification(notification);
pushDTO.setPushMessage(pushMessage);
//设置消息离线时间
pushDTO.setSettings(new Settings());
pushDTO.getSettings().setTtl(3 * 24 * 3600 * 1000);
搞不懂咋敏感了
String cid = beanGetui.getCid();
GeTuiHelper.pushToSingleByCid02(cid, "个推通知标题355", "个推通知消息主题内容", new GeTuiCallBack() {
@OverRide
public void onSuccuss(Map<String, Map<String, String>> map) {
log.info(map.toString());
}
@OverRide
public void onFail(int code, String message) {
log.info(message);
}
});
问题好像出在body字段,随便什么字符串都报敏感,换成json格式也不行,咋弄啊
The text was updated successfully, but these errors were encountered: