File tree Expand file tree Collapse file tree 1 file changed +26
-9
lines changed Expand file tree Collapse file tree 1 file changed +26
-9
lines changed Original file line number Diff line number Diff line change 1
1
package cn .jpush .api .push ;
2
2
3
+ import com .google .gson .annotations .SerializedName ;
4
+
3
5
/*
4
6
* Should be set into Notification extras with key "ios"
5
7
*/
6
8
public class IosExtras {
7
9
8
- public IosExtras (int badge , String sound ) {
10
+ private int badge = 0 ;
11
+
12
+ private String sound = "" ;
13
+
14
+ @ SerializedName ("content-available" )
15
+ private boolean contentAvailable = false ;
16
+
17
+ public IosExtras (int badge , String sound , boolean contentAvailable ) {
9
18
this .badge = badge ;
10
19
this .sound = sound ;
20
+ this .contentAvailable = contentAvailable ;
11
21
}
12
22
23
+ public IosExtras (int badge , String sound ) {
24
+ this .badge = badge ;
25
+ this .sound = sound ;
26
+ }
27
+
13
28
public IosExtras (String sound ) {
14
29
this .sound = sound ;
15
30
}
@@ -18,13 +33,6 @@ public IosExtras(int badge) {
18
33
this .badge = badge ;
19
34
}
20
35
21
- /*
22
- * Badge Notification,默认是(0)
23
- */
24
- private int badge = 0 ;
25
-
26
- private String sound = "" ;
27
-
28
36
public int getBadge () {
29
37
return badge ;
30
38
}
@@ -39,7 +47,16 @@ public String getSound() {
39
47
40
48
public void setSound (String sound ) {
41
49
this .sound = sound ;
42
- }
50
+ }
51
+
52
+ public boolean isContentAvailable () {
53
+ return contentAvailable ;
54
+ }
55
+
56
+ public void setContentAvailable (boolean contentAvailable ) {
57
+ this .contentAvailable = contentAvailable ;
58
+ }
59
+
43
60
44
61
}
45
62
You can’t perform that action at this time.
0 commit comments