@@ -82,6 +82,31 @@ data class PendingIntent (
82
82
)
83
83
}
84
84
}
85
+
86
+ /* *
87
+ * Corresponds to `androidx.core.app.NotificationCompat.InboxStyle`
88
+ *
89
+ * See: https://developer.android.com/reference/androidx/core/app/NotificationCompat.InboxStyle
90
+ *
91
+ * Generated class from Pigeon that represents data sent in messages.
92
+ */
93
+ data class InboxStyle (
94
+ val summaryText : String
95
+
96
+ ) {
97
+ companion object {
98
+ @Suppress(" LocalVariableName" )
99
+ fun fromList (__pigeon_list : List <Any ?>): InboxStyle {
100
+ val summaryText = __pigeon_list [0 ] as String
101
+ return InboxStyle (summaryText)
102
+ }
103
+ }
104
+ fun toList (): List <Any ?> {
105
+ return listOf (
106
+ summaryText,
107
+ )
108
+ }
109
+ }
85
110
private object NotificationsPigeonCodec : StandardMessageCodec() {
86
111
override fun readValueOfType (type : Byte , buffer : ByteBuffer ): Any? {
87
112
return when (type) {
@@ -90,6 +115,11 @@ private object NotificationsPigeonCodec : StandardMessageCodec() {
90
115
PendingIntent .fromList(it)
91
116
}
92
117
}
118
+ 130 .toByte() -> {
119
+ return (readValue(buffer) as ? List <Any ?>)?.let {
120
+ InboxStyle .fromList(it)
121
+ }
122
+ }
93
123
else -> super .readValueOfType(type, buffer)
94
124
}
95
125
}
@@ -99,6 +129,10 @@ private object NotificationsPigeonCodec : StandardMessageCodec() {
99
129
stream.write(129 )
100
130
writeValue(stream, value.toList())
101
131
}
132
+ is InboxStyle -> {
133
+ stream.write(130 )
134
+ writeValue(stream, value.toList())
135
+ }
102
136
else -> super .writeValue(stream, value)
103
137
}
104
138
}
@@ -125,7 +159,7 @@ interface AndroidNotificationHostApi {
125
159
* https://developer.android.com/reference/kotlin/android/app/NotificationManager.html#notify
126
160
* https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder
127
161
*/
128
- fun notify (tag : String? , id : Long , channelId : String , color : Long? , contentIntent : PendingIntent ? , contentText : String? , contentTitle : String? , extras : Map <String ?, String ?>? , smallIconResourceName : String? )
162
+ fun notify (tag : String? , id : Long , channelId : String , color : Long? , contentIntent : PendingIntent ? , contentText : String? , contentTitle : String? , extras : Map <String ?, String ?>? , smallIconResourceName : String? , groupKey : String? , isGroupSummary : Boolean? , inboxStyle : InboxStyle ? , autoCancel : Boolean? )
129
163
130
164
companion object {
131
165
/* * The codec used by AndroidNotificationHostApi. */
@@ -150,8 +184,12 @@ interface AndroidNotificationHostApi {
150
184
val contentTitleArg = args[6 ] as String?
151
185
val extrasArg = args[7 ] as Map <String ?, String ?>?
152
186
val smallIconResourceNameArg = args[8 ] as String?
187
+ val groupKeyArg = args[9 ] as String?
188
+ val isGroupSummaryArg = args[10 ] as Boolean?
189
+ val inboxStyleArg = args[11 ] as InboxStyle ?
190
+ val autoCancelArg = args[12 ] as Boolean?
153
191
val wrapped: List <Any ?> = try {
154
- api.notify(tagArg, idArg, channelIdArg, colorArg, contentIntentArg, contentTextArg, contentTitleArg, extrasArg, smallIconResourceNameArg)
192
+ api.notify(tagArg, idArg, channelIdArg, colorArg, contentIntentArg, contentTextArg, contentTitleArg, extrasArg, smallIconResourceNameArg, groupKeyArg, isGroupSummaryArg, inboxStyleArg, autoCancelArg )
155
193
listOf (null )
156
194
} catch (exception: Throwable ) {
157
195
wrapError(exception)
0 commit comments