Skip to content

[flutter_local_notifications] add conversationId/parentChannelId to AndroidNotificationChannel - #2883

Draft
vishnuprasad0 wants to merge 1 commit into
MaikuB:masterfrom
vishnuprasad0:feat/android-conversation-channel
Draft

vishnuprasad0 wants to merge 1 commit into
MaikuB:masterfrom
vishnuprasad0:feat/android-conversation-channel

Conversation

@vishnuprasad0

@vishnuprasad0 vishnuprasad0 commented Nov 18, 2026 •

Copy link
Copy Markdown

Adds conversationId and parentChannelId to AndroidNotificationChannel.
On Android 11 (API 30) and newer, setting both marks the channel as a conversation channel via
NotificationChannel.setConversationId(parentChannelId, conversationId), so its notifications show
up in the conversation space and can appear as bubbles. Both are optional and default to null, so
nothing changes for existing channels.
This supersedes #2797 — the original implementation is @PolynomialDivision's, and this version just
addresses your review there. The SDK_INT check is now an outer guard so the null/empty checks don't
run on older API levels, and the redundant comments are gone.
On your question about the Gradle bump: it isn't needed here. The original went through AndroidX's
NotificationChannelCompat, which is why it bumped androidx.core. Calling
android.app.NotificationChannel.setConversationId(...) directly is supported by the platform SDK
from API 30 and this repo already compiles above that, so android/build.gradle is untouched.
For tests I extended the existing AndroidNotificationChannel method-channel serialization tests —
both values present, both null by default, and a round trip with both set.
One gap: AndroidNotificationChannel has no fromMap constructor, so reading conversation IDs back
from getNotificationChannels() isn't covered. That wasn't in #2797 either, but say the word and
I'll add it.

@vishnuprasad0
vishnuprasad0 marked this pull request as draft November 18, 2026 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant