From 5447066fc061cee9636f13a933fe58a589f10101 Mon Sep 17 00:00:00 2001 From: JoshLi <542938192@qq.com> Date: Mon, 24 Dec 2018 17:03:54 +0800 Subject: [PATCH 1/5] Add thread-id for iOSNotification --- .../model/notification/IosNotification.java | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/main/java/cn/jpush/api/push/model/notification/IosNotification.java b/src/main/java/cn/jpush/api/push/model/notification/IosNotification.java index 95b27f96..c00c3b3e 100644 --- a/src/main/java/cn/jpush/api/push/model/notification/IosNotification.java +++ b/src/main/java/cn/jpush/api/push/model/notification/IosNotification.java @@ -17,6 +17,9 @@ *
  • badge: 支持 setBadge(int) 方法来设置;支持 incrBadge(int) 方法来增加。
  • *
  • sound: 支持 setSound(string) 方法来设置声音文件。或者 setSound(JSON object) 对应官方payload结构
  • *
  • content-available: 用来支持后台推送。如果该值赋值为 1,表示开启后台推送。
  • + *
  • mutable-content: 通知扩展
  • + *
  • category: IOS 8 才支持。设置 APNs payload 中的 "category" 字段值
  • + *
  • mutable-content: 通知扩展
  • *
  • extras: JSON object. 支持更多的自定义字段信息。
  • * *
    @@ -37,6 +40,7 @@ public class IosNotification extends PlatformNotification { private static final String CONTENT_AVAILABLE = "content-available"; private static final String MUTABLE_CONTENT = "mutable-content"; private static final String CATEGORY = "category"; + private static final String THREAD_ID = "thread-id"; private static final String ALERT_VALID_BADGE = "Badge number should be 0~99999, " + "and can be prefixed with + to add, - to minus"; @@ -49,11 +53,12 @@ public class IosNotification extends PlatformNotification { private final boolean contentAvailable; private final String category; private final boolean mutableContent; + private final String threadId; private IosNotification(Object alert, Object sound, String badge, boolean contentAvailable, boolean soundDisabled, boolean badgeDisabled, - String category, boolean mutableContent, + String category, boolean mutableContent,String threadId, Map extras, Map numberExtras, Map booleanExtras, @@ -67,6 +72,7 @@ private IosNotification(Object alert, Object sound, String badge, this.badgeDisabled = badgeDisabled; this.category = category; this.mutableContent = mutableContent; + this.threadId = threadId; } public static Builder newBuilder() { @@ -115,6 +121,9 @@ public JsonElement toJSON() { if (mutableContent) { json.add(MUTABLE_CONTENT, new JsonPrimitive(true)); } + if (null != threadId) { + json.add(THREAD_ID, new JsonPrimitive(threadId)); + } return json; } @@ -128,6 +137,7 @@ public static class Builder extends PlatformNotification.Builder Date: Mon, 24 Dec 2018 17:05:18 +0800 Subject: [PATCH 2/5] [maven-release-plugin] prepare release v3.3.10 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 58fc4a1d..270c760c 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ cn.jpush.api jpush-client - 3.3.10-SNAPSHOT + 3.3.10 jar https://github.com/jpush/jpush-api-java-client JPush API Java Client @@ -35,7 +35,7 @@ https://github.com/jpush/jpush-api-java-client scm:git:git@github.com:jpush/jpush-api-java-client.git scm:git:git@github.com:jpush/jpush-api-java-client.git - v3.3.5 + v3.3.10 From 02d0a56eba0d7fe682d74e660c0a2ee15a3ee95b Mon Sep 17 00:00:00 2001 From: JoshLi <542938192@qq.com> Date: Mon, 24 Dec 2018 17:05:19 +0800 Subject: [PATCH 3/5] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 270c760c..8269a102 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ cn.jpush.api jpush-client - 3.3.10 + 3.3.11-SNAPSHOT jar https://github.com/jpush/jpush-api-java-client JPush API Java Client @@ -35,7 +35,7 @@ https://github.com/jpush/jpush-api-java-client scm:git:git@github.com:jpush/jpush-api-java-client.git scm:git:git@github.com:jpush/jpush-api-java-client.git - v3.3.10 + v3.3.5 From bc758a56414b3b80eca4209272bc5bc4d8081c31 Mon Sep 17 00:00:00 2001 From: JoshLi <542938192@qq.com> Date: Mon, 24 Dec 2018 17:20:07 +0800 Subject: [PATCH 4/5] Update DOC --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 00d10486..ca4e8c87 100644 --- a/README.md +++ b/README.md @@ -18,13 +18,13 @@ ## 安装 ### maven 方式 -将下边的依赖条件放到你项目的 maven pom.xml 文件里。 +将下边的依赖条件放到你项目的 maven pom.xml 文件里。以 v3.3.10 为例,最新版本请看[Release页面](https://github.com/jpush/jpush-api-java-client/releases) ```Java cn.jpush.api jpush-client - 3.3.9 + 3.3.10 ``` ### jar 包方式 @@ -33,6 +33,7 @@ ### 依赖包 +* [jiguang-java-client-common](https://github.com/jpush/jiguang-java-client-common) / 极光 Java client 的公共封装开发包,必须依赖,查看[最新版本](https://github.com/jpush/jiguang-java-client-common/releases) * [slf4j](http://www.slf4j.org/) / log4j (Logger) * [gson](https://code.google.com/p/google-gson/) (Google JSON Utils) @@ -44,7 +45,7 @@ cn.jpush.api jiguang-common - 1.1.3 + 1.1.4 io.netty From a6209f2b12aa1af35e29288a8a542c683acce60d Mon Sep 17 00:00:00 2001 From: JoshLi <542938192@qq.com> Date: Mon, 24 Dec 2018 17:23:13 +0800 Subject: [PATCH 5/5] Update DOC --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ca4e8c87..70ccabde 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ ## 安装 ### maven 方式 -将下边的依赖条件放到你项目的 maven pom.xml 文件里。以 v3.3.10 为例,最新版本请看[Release页面](https://github.com/jpush/jpush-api-java-client/releases) +将下边的依赖条件放到你项目的 maven pom.xml 文件里。v3.3.10 为例,最新版本请看[Release页面](https://github.com/jpush/jpush-api-java-client/releases) ```Java @@ -33,7 +33,7 @@ ### 依赖包 -* [jiguang-java-client-common](https://github.com/jpush/jiguang-java-client-common) / 极光 Java client 的公共封装开发包,必须依赖,查看[最新版本](https://github.com/jpush/jiguang-java-client-common/releases) +* [jiguang-java-client-common](https://github.com/jpush/jiguang-java-client-common) / 极光 Java client 的公共封装开发包,必须依赖,v1.1.4 为例,查看[最新版本](https://github.com/jpush/jiguang-java-client-common/releases) * [slf4j](http://www.slf4j.org/) / log4j (Logger) * [gson](https://code.google.com/p/google-gson/) (Google JSON Utils)