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

服务端推送提示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 负责人:无 分享
已邀请:

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

  • 标题 / 粗斜体
  • 代码片段
  • 超链接 / 图片 / 视频
  • 列表 / 引用

文章内容较多时,可以用标题分段 :

## 大标题 
### 小标题

斜体 / 粗体 :

**粗体** 
*斜体*
***粗斜体***

代码片段 :

``` javascript
代码片段
```

超链接 :

[链接文字](链接地址) 例: [百度](http://www.baidu.com)

图片 :

![图片说明](图片地址) 例: ![百度logo](http://www.baidu.com/img/bdlogo.gif)

视频 :

!![视频说明](视频地址) 例: !![优酷视频](http://youku.com)

有序列表 :

1. 123
2. 123
3. 123

无序列表 :

- 123
- 123
- 123

引用 : ( 双回车后结束引用 )

> 引用内容
引用内容
引用内容