fenglong
fenglong
  • 发布:2021-01-21 16:34
  • 更新:2021-01-21 16:34
  • 阅读:813

服务端推送提示AppidError

分类:uni-app

有三个问题:

  1. 正式打包后的app和运行到手机的调试app生成的cid不同
  2. 服务端推送,正式app,可以发送成功,但是推送调试app,就提示AppidError
  3. 正式app,收到厂商通道的离线消息,点击后,可以打开app,但是无法跳转指定的页面。以下是生成推送模板的代码:

    TransmissionTemplate template = new TransmissionTemplate();  
        template.setAppId(appId);  
        template.setAppkey(appKey);  
        template.setTransmissionType(2);  
        if(type.equals("android")) {  
            JSONObject content = new JSONObject();  
            content.put("title", sysMsgType.getTitle());  
            content.put("content", sysMsgType.getContent());  
            JSONObject payload = new JSONObject();  
            payload.put("url", sysMsgType.getUrl());  
            payload.put("isTabbar", false);  
            content.put("payload", payload);  
            template.setTransmissionContent(content.toJSONString());  
    
            Notify notify = new Notify();  
            notify.setType(GtReq.NotifyInfo.Type._intent);  
            notify.setTitle(sysMsgType.getTitle());  
            notify.setContent(sysMsgType.getContent());  
            notify.setUrl(sysMsgType.getUrl());  
            notify.setPayload(payload.toJSONString());  
            StringBuilder sb = new StringBuilder("intent:#Intent;action=android.intent.action.oppopush;launchFlags=0x14000000;component=com.xx.xxx/io.dcloud.PandoraEntry;S.UP-OL-SU=true;");  
            sb.append("S.title=").append(sysMsgType.getTitle());  
            sb.append(";S.content=").append(sysMsgType.getContent());  
            sb.append(";S.payload=").append(payload.toJSONString());  
            sb.append(";end");  
            log.debug(sb.toString());  
            notify.setIntent(sb.toString());  
            template.set3rdNotifyInfo(notify);  
        }
2021-01-21 16:34 负责人:无 分享
已邀请:

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