소스 검색

修改推送参数

hgw 3 년 전
부모
커밋
4a5c011b80
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/message/provider/JiguangPushPlugin.java

+ 5 - 0
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/message/provider/JiguangPushPlugin.java

@@ -90,6 +90,8 @@ public class JiguangPushPlugin implements MessageSenderPlugin, InitializingBean
         android_extras.put("type", "infomation");
         android_extras.put("url", url);
         android_extras.put("memo", url);
+        //2022年6月22日 增加 third_url_encode 参数,极光推送数据中带有#号需要转译
+        android_extras.put("third_url_encode", true);
         android.put("extras", android_extras);
         Optional.ofNullable(androidIntent)
                 .ifPresent(intent -> android.put("intent", intent));
@@ -144,6 +146,9 @@ public class JiguangPushPlugin implements MessageSenderPlugin, InitializingBean
                 break;
             case "TEACHER":
                 base64_auth_string = encryptBASE64(this.teacherAppKey + ":" + this.teacherMasterSecret);
+                androidIntent = new JSONObject();
+                //2022年6月22日增加url参数 针对教师端
+                androidIntent.put("url", "intent:#Intent;action=cn.jiguang.push.customAction;component=com.dayayuemeng.teacher/com.dayayuemeng.teacher.ui.MainActivity;end");
                 break;
             default:
                 base64_auth_string = encryptBASE64(this.systemAppKey + ":" + this.systemMasterSecret);