@@ -35,6 +35,8 @@ public class IosNotification extends PlatformNotification {
35
35
private static final String BADGE = "badge" ;
36
36
private static final String SOUND = "sound" ;
37
37
private static final String CONTENT_AVAILABLE = "content-available" ;
38
+ private static final String MUTABLE_CONTENT = "mutable-content" ;
39
+ private static final String SUBTITLE = "subtitle" ;
38
40
private static final String CATEGORY = "category" ;
39
41
40
42
private static final String ALERT_VALID_BADGE = "Badge number should be 0~99999, "
@@ -47,10 +49,13 @@ public class IosNotification extends PlatformNotification {
47
49
private final String badge ;
48
50
private final boolean contentAvailable ;
49
51
private final String category ;
52
+ private final boolean mutableContent ;
53
+ private final String subtitle ;
54
+
50
55
51
56
private IosNotification (Object alert , String sound , String badge ,
52
57
boolean contentAvailable , boolean soundDisabled , boolean badgeDisabled ,
53
- String category ,
58
+ String category , boolean mutableContent , String subtitle ,
54
59
Map <String , String > extras ,
55
60
Map <String , Number > numberExtras ,
56
61
Map <String , Boolean > booleanExtras ,
@@ -63,6 +68,8 @@ private IosNotification(Object alert, String sound, String badge,
63
68
this .soundDisabled = soundDisabled ;
64
69
this .badgeDisabled = badgeDisabled ;
65
70
this .category = category ;
71
+ this .mutableContent = mutableContent ;
72
+ this .subtitle = subtitle ;
66
73
}
67
74
68
75
public static Builder newBuilder () {
@@ -103,6 +110,13 @@ public JsonElement toJSON() {
103
110
if (null != category ) {
104
111
json .add (CATEGORY , new JsonPrimitive (category ));
105
112
}
113
+ if (mutableContent ) {
114
+ json .add (MUTABLE_CONTENT , new JsonPrimitive (1 ));
115
+ }
116
+ if (null != subtitle ) {
117
+ json .add (SUBTITLE , new JsonPrimitive (subtitle ));
118
+ }
119
+
106
120
107
121
return json ;
108
122
}
@@ -115,6 +129,8 @@ public static class Builder extends PlatformNotification.Builder<IosNotification
115
129
private boolean soundDisabled = false ;
116
130
private boolean badgeDisabled = false ;
117
131
private String category ;
132
+ private boolean mutableContent ;
133
+ private String subtitle ;
118
134
119
135
protected Builder getThis () {
120
136
return this ;
@@ -181,10 +197,20 @@ public Builder setAlert(Object alert) {
181
197
return this ;
182
198
}
183
199
200
+ public Builder setMutableContent (boolean mutableContent ) {
201
+ this .mutableContent = mutableContent ;
202
+ return this ;
203
+ }
204
+
205
+ public Builder setSubtitle (String subtitle ) {
206
+ this .subtitle = subtitle ;
207
+ return this ;
208
+ }
209
+
184
210
185
211
public IosNotification build () {
186
212
return new IosNotification (alert , sound , badge , contentAvailable ,
187
- soundDisabled , badgeDisabled , category ,
213
+ soundDisabled , badgeDisabled , category , mutableContent , subtitle ,
188
214
extrasBuilder , numberExtrasBuilder , booleanExtrasBuilder , jsonExtrasBuilder );
189
215
}
190
216
}
0 commit comments