果果昵
果果昵
  • 发布:2016-08-31 16:26
  • 更新:2016-08-31 16:26
  • 阅读:3610

IOS推送hbuilder客户端receive事件如何区分是个推通道下发的还是APNS消息带的透传消息

分类:HTML5+

IOS推送
应用在线时走的个推通道,不在线时走的APNS通道,但是都进入receive事件,那么hbuilder客户端receive事件中如何区分是个推通道下发的还是APNS消息带的透传消息呢?

推送服务端用的C#程序写的,推送模板内容如下:
TransmissionTemplate template = new TransmissionTemplate();
template.AppId = APPID;
template.AppKey = APPKEY;
template.TransmissionType = "1"; //应用启动类型,1:强制应用启动 2:等待应用启动
template.TransmissionContent = "{title:通知标题,content:通知内容3,payload:" + WarContent + "}"; //透传内容

//iOS简单推送
APNPayload apnpayload = new APNPayload();
SimpleAlertMsg alertMsg = new SimpleAlertMsg(WarContent);
apnpayload.AlertMsg = alertMsg;
apnpayload.Badge = 0;
apnpayload.ContentAvailable = 1;
apnpayload.Category = "";
apnpayload.Sound = "";

apnpayload.addCustomMsg("payload", "{name:3}");
template.setAPNInfo(apnpayload);
return template;

请问客户端这面应receive事件里该怎么判断?

2016-08-31 16:26 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复