File tree Expand file tree Collapse file tree 6 files changed +44
-8
lines changed
src/main/java/cn/jiguang/sdk/bean/push/message/notification Expand file tree Collapse file tree 6 files changed +44
-8
lines changed Original file line number Diff line number Diff line change 1515## 1. 集成
1616引入sdk包
1717``` xml
18- <!-- 以5.2.9版本为例 -->
18+ <!-- 以5.2.10版本为例 -->
1919<dependencies >
2020 <!-- jiguang-sdk -->
2121 <dependency >
2222 <groupId >io.github.jpush</groupId >
2323 <artifactId >jiguang-sdk</artifactId >
24- <version >5.2.9 </version >
24+ <version >5.2.10 </version >
2525 </dependency >
2626</dependencies >
2727```
9898``` java
9999cn.jiguang.sdk.exception. ApiErrorException
100100```
101+ ``` yaml
102+ # 配置中打开feign-debug日志打印
103+ logging :
104+ level :
105+ feign.Logger : debug
106+ ` ` `
101107* 排查问题,请务必` setLoggerLevel(Logger.Level.FULL)`,查看feign日志
102108 > 打印类为feign.Logger,从---> POST,到<--- END HTTP,参考下图
103109* 如需技术支持,请提供使用环境、复现步骤、示例代码、日志信息
Original file line number Diff line number Diff line change 1313
1414 <groupId >io.github.jpush</groupId >
1515 <artifactId >example-for-spring</artifactId >
16- <version >5.2.9 </version >
16+ <version >5.2.10 </version >
1717
1818 <properties >
1919 <maven .compiler.source>8</maven .compiler.source>
2626 <dependency >
2727 <groupId >io.github.jpush</groupId >
2828 <artifactId >jiguang-sdk</artifactId >
29- <version >5.2.9 </version >
29+ <version >5.2.10 </version >
3030 </dependency >
3131 <!-- lombok -->
3232 <dependency >
Original file line number Diff line number Diff line change 77
88logging :
99 level :
10- root : debug
10+ feign.Logger : debug
1111
1212jiguang :
1313 api :
Original file line number Diff line number Diff line change 77 <parent >
88 <groupId >io.github.jpush</groupId >
99 <artifactId >jiguang-sdk-java</artifactId >
10- <version >5.2.9 </version >
10+ <version >5.2.10 </version >
1111 <relativePath >../pom.xml</relativePath >
1212 </parent >
1313
1414 <groupId >io.github.jpush</groupId >
1515 <artifactId >jiguang-sdk</artifactId >
16- <version >5.2.9 </version >
16+ <version >5.2.10 </version >
1717 <packaging >jar</packaging >
1818
1919 <properties >
Original file line number Diff line number Diff line change @@ -498,6 +498,36 @@ public static class HMOS {
498498 @ JsonInclude (JsonInclude .Include .NON_NULL )
499499 private String displayForeground ;
500500
501+ /**
502+ * 自定义通知铃声
503+ * 该字段对推送走极光通道(JPush HarmonyOS SDK ≥ v1.3.0 版本)和鸿蒙厂商通道通知均生效
504+ * 此处设置的铃声文件必须放在应用的/resources/rawfile路径下,详见官方sound字段说明。
505+ * 涉及到开发者需要向鸿蒙官方申请自定义铃声权益
506+ */
507+ @ JsonProperty ("sound" )
508+ @ JsonInclude (JsonInclude .Include .NON_NULL )
509+ private String sound ;
510+
511+ /**
512+ * 自定义通知铃声时长,需要配合sound字段使用
513+ * 该字段只对推送走鸿蒙厂商通道生效
514+ * 只有当请求同时携带sound字段,soundDuration字段才会生效。仅支持数字,单位为秒,取值范围 [1, 60],,详见官方soundDuration字段说明
515+ * 涉及到开发者需要向鸿蒙官方申请自定义铃声权益
516+ */
517+ @ JsonProperty ("sound_duration" )
518+ @ JsonInclude (JsonInclude .Include .NON_NULL )
519+ private Integer soundDuration ;
520+
521+ /**
522+ * 鸿蒙卡片刷新消息、实况窗消息内容体
523+ * 仅对 push_type=1(卡片刷新)、 push_type=7(实况窗消息)生效,且 push_type=1 或 push_type=7 时要求此字段必填,上述其它必填字段可忽略不填。
524+ * 极光 hm_payload 字段值会直接透传给鸿蒙 payload 字段,极光不对消息体完整性和正确性进行校验,请开发者对照官方文档说明进行传参,详见:鸿蒙场景化消息请求示例
525+ * 当您推送卡片刷新 或 实况窗消息时,推送仅支持通过鸿蒙通道下发,推送下发策略仅支持ospush(下发策略默认值ospush,如自定义其它下发策略请求报错)
526+ */
527+ @ JsonProperty ("hm_payload" )
528+ @ JsonInclude (JsonInclude .Include .NON_NULL )
529+ private Map <String , Object > hmPayload ;
530+
501531 @ Data
502532 public static class Intent {
503533 @ JsonProperty ("url" )
Original file line number Diff line number Diff line change 66
77 <groupId >io.github.jpush</groupId >
88 <artifactId >jiguang-sdk-java</artifactId >
9- <version >5.2.9 </version >
9+ <version >5.2.10 </version >
1010 <packaging >pom</packaging >
1111
1212 <name >Jiguang SDK For Rest Api</name >
You can’t perform that action at this time.
0 commit comments