diff --git a/README.md b/README.md
index 87b0adc..006ea97 100644
--- a/README.md
+++ b/README.md
@@ -3,10 +3,10 @@
这是 Jiguang REST API 的 Java 版本封装开发包,是由极光推送官方提供的,一般支持最新的 API 功能。
对应的 REST API 文档:
-* [REST API - Push](https://docs.jiguang.cn/jpush/server/push/rest_api_v3_push/)
-* [REST API - Device](https://docs.jiguang.cn/jpush/server/push/rest_api_v3_device/)
-* [REST API - Report](https://docs.jiguang.cn/jpush/server/push/rest_api_v3_report/)
-* [REST API - Admin](https://docs.jiguang.cn/jpush/server/push/rest_api_admin_api_v1/)
+* [REST API - Push](https://docs.jiguang.cn/jpush/server/push/rest_api_v3_push)
+* [REST API - Device](https://docs.jiguang.cn/jpush/server/push/rest_api_v3_device)
+* [REST API - Report](https://docs.jiguang.cn/jpush/server/push/rest_api_v3_report)
+* [REST API - Admin](https://docs.jiguang.cn/jpush/server/push/rest_api_admin_api_v1)
支持 Java JDK 1.8 及其以上版本。
> 支持 Java JDK 1.6 版本:[jpush-api-java-client](https://github.com/jpush/jpush-api-java-client),但不再更新。
@@ -14,13 +14,13 @@
## 1. 集成
引入sdk包
```xml
-
+
io.github.jpush
jiguang-sdk
- 5.0.9
+ 5.1.0
```
diff --git a/example-for-spring/pom.xml b/example-for-spring/pom.xml
index 3370e2b..18f05a7 100644
--- a/example-for-spring/pom.xml
+++ b/example-for-spring/pom.xml
@@ -13,7 +13,7 @@
io.github.jpush
example-for-spring
- 5.0.9
+ 5.1.0
8
@@ -26,7 +26,7 @@
io.github.jpush
jiguang-sdk
- 5.0.9
+ 5.1.0
diff --git a/jiguang-sdk/pom.xml b/jiguang-sdk/pom.xml
index 62a55ae..c0b5d3d 100644
--- a/jiguang-sdk/pom.xml
+++ b/jiguang-sdk/pom.xml
@@ -7,13 +7,13 @@
io.github.jpush
jiguang-sdk-java
- 5.0.9
+ 5.1.0
../pom.xml
io.github.jpush
jiguang-sdk
- 5.0.9
+ 5.1.0
jar
diff --git a/jiguang-sdk/src/main/java/cn/jiguang/sdk/bean/push/PushSendParam.java b/jiguang-sdk/src/main/java/cn/jiguang/sdk/bean/push/PushSendParam.java
index 5eb504c..e51b871 100644
--- a/jiguang-sdk/src/main/java/cn/jiguang/sdk/bean/push/PushSendParam.java
+++ b/jiguang-sdk/src/main/java/cn/jiguang/sdk/bean/push/PushSendParam.java
@@ -32,7 +32,7 @@ public class PushSendParam {
/**
* 两种格式
* 字符串:"all"
- * {@link Platform}数组:["android","ios","quickapp"]
+ * {@link Platform}数组:["android","ios","hmos","quickapp"]
*/
@JsonProperty("platform")
private Object platform;
diff --git a/jiguang-sdk/src/main/java/cn/jiguang/sdk/bean/push/message/notification/NotificationMessage.java b/jiguang-sdk/src/main/java/cn/jiguang/sdk/bean/push/message/notification/NotificationMessage.java
index 463469c..a75206f 100644
--- a/jiguang-sdk/src/main/java/cn/jiguang/sdk/bean/push/message/notification/NotificationMessage.java
+++ b/jiguang-sdk/src/main/java/cn/jiguang/sdk/bean/push/message/notification/NotificationMessage.java
@@ -32,6 +32,10 @@ public class NotificationMessage {
@JsonInclude(JsonInclude.Include.NON_NULL)
private IOS ios;
+ @JsonProperty("hmos")
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ private HMOS hmos;
+
@JsonProperty("quickapp")
@JsonInclude(JsonInclude.Include.NON_NULL)
private QuickApp quickApp;
@@ -187,6 +191,52 @@ public static class IOS {
private String interruptionLevel;
}
+ @Data
+ public static class HMOS {
+ @JsonProperty("alert")
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ private String alert;
+
+ @JsonProperty("title")
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ private String title;
+
+ @JsonProperty("category")
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ private String category;
+
+ @JsonProperty("large_icon")
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ private String largeIcon;
+
+ @JsonProperty("intent")
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ private Android.Intent intent;
+
+ @JsonProperty("badge_add_num")
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ private Integer badgeAddNumber;
+
+ @JsonProperty("extras")
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ private Map extras;
+
+ @JsonProperty("test_message")
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ private Boolean isTest;
+
+ @JsonProperty("receipt_id")
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ private String receiptId;
+
+ @Data
+ public static class Intent {
+ @JsonProperty("url")
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ private String url;
+ }
+ }
+
@Data
public static class QuickApp {
@JsonProperty("title")
diff --git a/jiguang-sdk/src/main/java/cn/jiguang/sdk/client/AdminClient.java b/jiguang-sdk/src/main/java/cn/jiguang/sdk/client/AdminClient.java
index 22df45c..e13dce9 100644
--- a/jiguang-sdk/src/main/java/cn/jiguang/sdk/client/AdminClient.java
+++ b/jiguang-sdk/src/main/java/cn/jiguang/sdk/client/AdminClient.java
@@ -6,7 +6,7 @@
import feign.RequestLine;
/**
- * (REST API - Admin)
+ * (REST API - Admin)
*/
public interface AdminClient {
diff --git a/jiguang-sdk/src/main/java/cn/jiguang/sdk/client/DeviceClient.java b/jiguang-sdk/src/main/java/cn/jiguang/sdk/client/DeviceClient.java
index 049aff3..4ada966 100644
--- a/jiguang-sdk/src/main/java/cn/jiguang/sdk/client/DeviceClient.java
+++ b/jiguang-sdk/src/main/java/cn/jiguang/sdk/client/DeviceClient.java
@@ -7,7 +7,7 @@
import feign.RequestLine;
/**
- * (REST API - Device)
+ * (REST API - Device)
*/
public interface DeviceClient {
diff --git a/jiguang-sdk/src/main/java/cn/jiguang/sdk/client/PushClient.java b/jiguang-sdk/src/main/java/cn/jiguang/sdk/client/PushClient.java
index 451bfba..85f6cac 100644
--- a/jiguang-sdk/src/main/java/cn/jiguang/sdk/client/PushClient.java
+++ b/jiguang-sdk/src/main/java/cn/jiguang/sdk/client/PushClient.java
@@ -16,7 +16,7 @@
import feign.RequestLine;
/**
- * (REST API - Push)
+ * (REST API - Push)
*/
public interface PushClient {
diff --git a/jiguang-sdk/src/main/java/cn/jiguang/sdk/client/ReportClient.java b/jiguang-sdk/src/main/java/cn/jiguang/sdk/client/ReportClient.java
index f18252c..ac806b1 100644
--- a/jiguang-sdk/src/main/java/cn/jiguang/sdk/client/ReportClient.java
+++ b/jiguang-sdk/src/main/java/cn/jiguang/sdk/client/ReportClient.java
@@ -10,7 +10,7 @@
import java.util.Map;
/**
- * (REST API - Report)
+ * (REST API - Report)
*/
public interface ReportClient {
diff --git a/jiguang-sdk/src/main/java/cn/jiguang/sdk/constants/ApiConstants.java b/jiguang-sdk/src/main/java/cn/jiguang/sdk/constants/ApiConstants.java
index d7c90fc..681b4c5 100644
--- a/jiguang-sdk/src/main/java/cn/jiguang/sdk/constants/ApiConstants.java
+++ b/jiguang-sdk/src/main/java/cn/jiguang/sdk/constants/ApiConstants.java
@@ -10,6 +10,7 @@ interface Platform {
String ALL = "all";
String ANDROID = "android";
String IOS = "ios";
+ String HMOS = "hmos";
String QUICK_APP = "quickapp";
}
diff --git a/jiguang-sdk/src/main/java/cn/jiguang/sdk/enums/platform/Platform.java b/jiguang-sdk/src/main/java/cn/jiguang/sdk/enums/platform/Platform.java
index 884a110..40642e6 100644
--- a/jiguang-sdk/src/main/java/cn/jiguang/sdk/enums/platform/Platform.java
+++ b/jiguang-sdk/src/main/java/cn/jiguang/sdk/enums/platform/Platform.java
@@ -6,6 +6,7 @@ public enum Platform {
android(ApiConstants.Platform.ANDROID, "Android平台"),
ios(ApiConstants.Platform.IOS, "iOS平台"),
+ hmos(ApiConstants.Platform.HMOS, "鸿蒙平台"),
quickapp(ApiConstants.Platform.QUICK_APP, "快应用平台");
private String value;
diff --git a/pom.xml b/pom.xml
index 022c903..756d941 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
io.github.jpush
jiguang-sdk-java
- 5.0.9
+ 5.1.0
pom
Jiguang SDK For Rest Api