Skip to content

Update DelegationService to override default notification channel creation for TWAs - #615

Merged
gdziadosz-google merged 17 commits into
GoogleChrome:mainfrom
Dp-Goog:main
Aug 24, 2026
Merged

Update DelegationService to override default notification channel creation for TWAs#615
gdziadosz-google merged 17 commits into
GoogleChrome:mainfrom
Dp-Goog:main

Conversation

@Dp-Goog

@Dp-Goog Dp-Goog commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

The earlier changes worked to create the high priority notification channel and delete the old notification channel if that existed. More investigation revealed that it was flaky, and the root cause is that the super class for AndroidX always posted to the default channel, even though it seemed like the code in NotificationUtils was actually creating the correct channel.

This PR fixes that by overriding onNotifyNotificationWithChannel() by intercepting the notification, and manually setting a a high priority channel if the correct metadata exists. Verified manually using the test TWA that it works, with additional logging.

@Dp-Goog

Dp-Goog commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

@PEConn or @gdziadosz-google or @dtonderski-google , can anyone review this PR and help land this? This should be the last blocking thing needed for TWAs to support high priority notifications, thanks!

@Dp-Goog
Dp-Goog force-pushed the main branch 2 times, most recently from b1c0283 to 83bed85 Compare August 18, 2026 19:50

@PEConn PEConn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM % nit

@gdziadosz-google
gdziadosz-google merged commit 571891c into GoogleChrome:main Aug 24, 2026
8 checks passed
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.

3 participants