Commit 84b6b29 1 parent c2d0245 commit 84b6b29 Copy full SHA for 84b6b29
File tree 8 files changed +19
-7
lines changed
src/test/java/cn/jiguang/app/api
src/main/java/cn/jiguang/sdk/bean
8 files changed +19
-7
lines changed Original file line number Diff line number Diff line change 15
15
## 1. 集成
16
16
引入sdk包
17
17
``` xml
18
- <!-- 以5.1.6版本为例 -->
18
+ <!-- 以5.1.7版本为例 -->
19
19
<dependencies >
20
20
<!-- jiguang-sdk -->
21
21
<dependency >
22
22
<groupId >io.github.jpush</groupId >
23
23
<artifactId >jiguang-sdk</artifactId >
24
- <version >5.1.6 </version >
24
+ <version >5.1.7 </version >
25
25
</dependency >
26
26
</dependencies >
27
27
```
Original file line number Diff line number Diff line change 13
13
14
14
<groupId >io.github.jpush</groupId >
15
15
<artifactId >example-for-spring</artifactId >
16
- <version >5.1.6 </version >
16
+ <version >5.1.7 </version >
17
17
18
18
<properties >
19
19
<maven .compiler.source>8</maven .compiler.source>
26
26
<dependency >
27
27
<groupId >io.github.jpush</groupId >
28
28
<artifactId >jiguang-sdk</artifactId >
29
- <version >5.1.6 </version >
29
+ <version >5.1.7 </version >
30
30
</dependency >
31
31
<!-- lombok -->
32
32
<dependency >
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ public void setTag() {
65
65
String tag = "13111111111" ;
66
66
TagSetParam .RegistrationIds registrationIds = new TagSetParam .RegistrationIds ();
67
67
registrationIds .setAdd (Arrays .asList ("1104a89793af2cfc030" , "1104a89793af2cfc030" ));
68
+ // registrationIds.setRemove(Arrays.asList("1104a89793af2cfc030", "1104a89793af2cfc030"));
68
69
TagSetParam param = new TagSetParam ();
69
70
param .setRegistrationIds (registrationIds );
70
71
deviceApi .setTag (tag , param );
Original file line number Diff line number Diff line change 12
12
import cn .jiguang .sdk .bean .push .batch .BatchPushParam ;
13
13
import cn .jiguang .sdk .bean .push .batch .BatchPushSendParam ;
14
14
import cn .jiguang .sdk .bean .push .batch .BatchPushSendResult ;
15
+ import cn .jiguang .sdk .bean .push .callback .Callback ;
15
16
import cn .jiguang .sdk .bean .push .message .notification .NotificationMessage ;
16
17
import cn .jiguang .sdk .bean .push .options .Options ;
17
18
import cn .jiguang .sdk .bean .push .other .CidGetResult ;
@@ -110,6 +111,12 @@ public void send() {
110
111
options .setThirdPartyChannel (thirdPartyMap );
111
112
param .setOptions (options );
112
113
114
+ Map <String , Object > callbackParams = new HashMap <>();
115
+ callbackParams .put ("callbackKey" , "callbackValue" );
116
+ Callback callback = new Callback ();
117
+ callback .setParams (callbackParams );
118
+ param .setCallback (callback );
119
+
113
120
// 发送
114
121
PushSendResult result = pushApi .send (param );
115
122
log .info ("result:{}" , result );
Original file line number Diff line number Diff line change 7
7
<parent >
8
8
<groupId >io.github.jpush</groupId >
9
9
<artifactId >jiguang-sdk-java</artifactId >
10
- <version >5.1.6 </version >
10
+ <version >5.1.7 </version >
11
11
<relativePath >../pom.xml</relativePath >
12
12
</parent >
13
13
14
14
<groupId >io.github.jpush</groupId >
15
15
<artifactId >jiguang-sdk</artifactId >
16
- <version >5.1.6 </version >
16
+ <version >5.1.7 </version >
17
17
<packaging >jar</packaging >
18
18
19
19
<properties >
Original file line number Diff line number Diff line change 1
1
package cn .jiguang .sdk .bean .device ;
2
2
3
+ import com .fasterxml .jackson .annotation .JsonInclude ;
3
4
import com .fasterxml .jackson .annotation .JsonProperty ;
4
5
import lombok .Data ;
5
6
@@ -14,9 +15,11 @@ public class TagSetParam {
14
15
@ Data
15
16
public static class RegistrationIds {
16
17
@ JsonProperty ("add" )
18
+ @ JsonInclude (JsonInclude .Include .NON_NULL )
17
19
private List <String > add ;
18
20
19
21
@ JsonProperty ("remove" )
22
+ @ JsonInclude (JsonInclude .Include .NON_NULL )
20
23
private List <String > remove ;
21
24
}
22
25
Original file line number Diff line number Diff line change 13
13
public class Callback {
14
14
15
15
@ JsonProperty ("url" )
16
+ @ JsonInclude (JsonInclude .Include .NON_NULL )
16
17
private String url ;
17
18
18
19
/**
Original file line number Diff line number Diff line change 6
6
7
7
<groupId >io.github.jpush</groupId >
8
8
<artifactId >jiguang-sdk-java</artifactId >
9
- <version >5.1.6 </version >
9
+ <version >5.1.7 </version >
10
10
<packaging >pom</packaging >
11
11
12
12
<name >Jiguang SDK For Rest Api</name >
You can’t perform that action at this time.
0 commit comments