update
This commit is contained in:
@@ -115,7 +115,10 @@ public class MobV2PushUtil {
|
||||
pushDTO.setPushMessage(pushMessage);
|
||||
//此格式的透传消息由 unipush 做了特殊处理,会自动展示通知栏。开发者也可自定义其它格式,在客户端自己处理。
|
||||
//pushMessage.setTransmission(" {title:\"标题\",content:\"内容\",payload:\"快银到账1万元\"}");
|
||||
pushMessage.setTransmission(" {title:\"" + title + "\",content:\"" + content + "\"," + ext);
|
||||
|
||||
//pushMessage.setTransmission("{title:" + title + ", content:" + content + ext);
|
||||
|
||||
pushMessage.setTransmission("{title:\"" + title + "\",content:\"" + content + "\"," + ext);
|
||||
|
||||
// 设置接收人信息
|
||||
Audience audience = new Audience();
|
||||
@@ -131,8 +134,8 @@ public class MobV2PushUtil {
|
||||
Ups ups = new Ups();
|
||||
ThirdNotification thirdNotification = new ThirdNotification();
|
||||
ups.setNotification(thirdNotification);
|
||||
thirdNotification.setTitle("安卓离线展示的标题");
|
||||
thirdNotification.setBody("安卓离线展示的内容");
|
||||
thirdNotification.setTitle(title);
|
||||
thirdNotification.setBody(content);
|
||||
thirdNotification.setClickType("intent");
|
||||
//注意:intent参数必须按下方文档(特殊参数说明)要求的固定格式传值,intent错误会导致客户端无法收到消息
|
||||
thirdNotification.setIntent("intent://io.dcloud.unipush/?#Intent;scheme=unipush;launchFlags=0x4000000;component=io.dcloud.HBuilder/io.dcloud.PandoraEntry;S.UP-OL-SU=true;S.title=测试标题;S.content=测试内容;S.payload=test;end");
|
||||
@@ -141,8 +144,8 @@ public class MobV2PushUtil {
|
||||
|
||||
//ios离线apn通道推送的消息体
|
||||
Alert alert = new Alert();
|
||||
alert.setTitle("苹果离线通知栏标题");
|
||||
alert.setBody("苹果离线通知栏内容");
|
||||
alert.setTitle(title);
|
||||
alert.setBody(content);
|
||||
Aps aps = new Aps();
|
||||
aps.setContentAvailable(0);
|
||||
aps.setSound("default");
|
||||
|
||||
Reference in New Issue
Block a user