|
@@ -104,15 +104,15 @@ public class GeTuiUtils {
|
|
AndroidDTO androidDTO = new AndroidDTO();
|
|
AndroidDTO androidDTO = new AndroidDTO();
|
|
Ups ups = new Ups();
|
|
Ups ups = new Ups();
|
|
ThirdNotification notification1 = new ThirdNotification();;
|
|
ThirdNotification notification1 = new ThirdNotification();;
|
|
- ups.setNotification(notification1);
|
|
|
|
notification1.setTitle(title);
|
|
notification1.setTitle(title);
|
|
notification1.setBody(content);
|
|
notification1.setBody(content);
|
|
notification1.setClickType("intent");
|
|
notification1.setClickType("intent");
|
|
notification1.setIntent("intent:#Intent;launchFlags=0x04000000;action=android.intent.action.oppopush;component=uni.UNI7297DA2/io.dcloud.PandoraEntry;S.UP-OL-SU=true;S.title="+title+";S.content="+content+";S.payload=test;end");
|
|
notification1.setIntent("intent:#Intent;launchFlags=0x04000000;action=android.intent.action.oppopush;component=uni.UNI7297DA2/io.dcloud.PandoraEntry;S.UP-OL-SU=true;S.title="+title+";S.content="+content+";S.payload=test;end");
|
|
|
|
+ ups.setNotification(notification1);
|
|
//各厂商自有功能单项设置
|
|
//各厂商自有功能单项设置
|
|
//ups.addOption("HW", "/message/android/notification/badge/class", "io.dcloud.PandoraEntry ");
|
|
//ups.addOption("HW", "/message/android/notification/badge/class", "io.dcloud.PandoraEntry ");
|
|
//ups.addOption("HW", "/message/android/notification/badge/add_num", 1);
|
|
//ups.addOption("HW", "/message/android/notification/badge/add_num", 1);
|
|
- //ups.addOption("HW", "/message/android/notification/importance", "HIGH");
|
|
|
|
|
|
+ ups.addOption("HW", "/message/android/notification/importance", "HIGH");
|
|
//ups.addOption("VV","classification",1);
|
|
//ups.addOption("VV","classification",1);
|
|
androidDTO.setUps(ups);
|
|
androidDTO.setUps(ups);
|
|
pushChannel.setAndroid(androidDTO);
|
|
pushChannel.setAndroid(androidDTO);
|
|
@@ -154,6 +154,7 @@ public class GeTuiUtils {
|
|
IPushResult ret = push.pushMessageToSingle(msg, target, requstId);
|
|
IPushResult ret = push.pushMessageToSingle(msg, target, requstId);
|
|
System.out.println("个推 通知消息2:"+ret.getResponse().toString());
|
|
System.out.println("个推 通知消息2:"+ret.getResponse().toString());
|
|
}
|
|
}
|
|
|
|
+ System.out.println("推送成功:" + userDO.getUserName()+","+title+","+content);
|
|
}
|
|
}
|
|
catch (Exception e){
|
|
catch (Exception e){
|
|
System.out.println("推送异常:" + e.getMessage());
|
|
System.out.println("推送异常:" + e.getMessage());
|