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 11package cn .jpush .api .push ;
22
3+ import com .google .gson .annotations .SerializedName ;
4+
35/*
46 * Should be set into Notification extras with key "ios"
57 */
68public class IosExtras {
79
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 ) {
918 this .badge = badge ;
1019 this .sound = sound ;
20+ this .contentAvailable = contentAvailable ;
1121 }
1222
23+ public IosExtras (int badge , String sound ) {
24+ this .badge = badge ;
25+ this .sound = sound ;
26+ }
27+
1328 public IosExtras (String sound ) {
1429 this .sound = sound ;
1530 }
@@ -18,13 +33,6 @@ public IosExtras(int badge) {
1833 this .badge = badge ;
1934 }
2035
21- /*
22- * Badge Notification,默认是(0)
23- */
24- private int badge = 0 ;
25-
26- private String sound = "" ;
27-
2836 public int getBadge () {
2937 return badge ;
3038 }
@@ -39,7 +47,16 @@ public String getSound() {
3947
4048 public void setSound (String sound ) {
4149 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+
4360
4461}
4562
You can’t perform that action at this time.
0 commit comments