@@ -35,6 +35,8 @@ public class IosNotification extends PlatformNotification {
3535 private static final String BADGE = "badge" ;
3636 private static final String SOUND = "sound" ;
3737 private static final String CONTENT_AVAILABLE = "content-available" ;
38+ private static final String MUTABLE_CONTENT = "mutable-content" ;
39+ private static final String SUBTITLE = "subtitle" ;
3840 private static final String CATEGORY = "category" ;
3941
4042 private static final String ALERT_VALID_BADGE = "Badge number should be 0~99999, "
@@ -47,10 +49,13 @@ public class IosNotification extends PlatformNotification {
4749 private final String badge ;
4850 private final boolean contentAvailable ;
4951 private final String category ;
52+ private final boolean mutableContent ;
53+ private final String subtitle ;
54+
5055
5156 private IosNotification (Object alert , String sound , String badge ,
5257 boolean contentAvailable , boolean soundDisabled , boolean badgeDisabled ,
53- String category ,
58+ String category , boolean mutableContent , String subtitle ,
5459 Map <String , String > extras ,
5560 Map <String , Number > numberExtras ,
5661 Map <String , Boolean > booleanExtras ,
@@ -63,6 +68,8 @@ private IosNotification(Object alert, String sound, String badge,
6368 this .soundDisabled = soundDisabled ;
6469 this .badgeDisabled = badgeDisabled ;
6570 this .category = category ;
71+ this .mutableContent = mutableContent ;
72+ this .subtitle = subtitle ;
6673 }
6774
6875 public static Builder newBuilder () {
@@ -103,6 +110,13 @@ public JsonElement toJSON() {
103110 if (null != category ) {
104111 json .add (CATEGORY , new JsonPrimitive (category ));
105112 }
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+
106120
107121 return json ;
108122 }
@@ -115,6 +129,8 @@ public static class Builder extends PlatformNotification.Builder<IosNotification
115129 private boolean soundDisabled = false ;
116130 private boolean badgeDisabled = false ;
117131 private String category ;
132+ private boolean mutableContent ;
133+ private String subtitle ;
118134
119135 protected Builder getThis () {
120136 return this ;
@@ -181,10 +197,20 @@ public Builder setAlert(Object alert) {
181197 return this ;
182198 }
183199
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+
184210
185211 public IosNotification build () {
186212 return new IosNotification (alert , sound , badge , contentAvailable ,
187- soundDisabled , badgeDisabled , category ,
213+ soundDisabled , badgeDisabled , category , mutableContent , subtitle ,
188214 extrasBuilder , numberExtrasBuilder , booleanExtrasBuilder , jsonExtrasBuilder );
189215 }
190216 }
0 commit comments