Skip to content

Add TWA high priority notifications test site - #608

Open
Dp-Goog wants to merge 5 commits into
GoogleChrome:mainfrom
Dp-Goog:twa-notification-high-priority
Open

Add TWA high priority notifications test site#608
Dp-Goog wants to merge 5 commits into
GoogleChrome:mainfrom
Dp-Goog:twa-notification-high-priority

Conversation

@Dp-Goog

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

Copy link
Copy Markdown

Create a sample test TWA that wraps https://dp-goog.github.io/notifications-api-testing/, so that SW notifications can be sent. This mostly mimics the code in twa-notification-delegation, with the old code changes being:

  • The new androidx.browser.trusted.USE_HIGH_PRI_NOTIFICATIONS field set.
  • The TWA launches https://dp-goog.github.io/notifications-api-testing/ instead.
  • onCreate() and onDestroy() logs for notifications

Verified that it works, based on the following logs:

Screenshot 2026-08-06 at 4 37 27 PM

@Dp-Goog
Dp-Goog force-pushed the twa-notification-high-priority branch from be621bf to dfb1179 Compare August 7, 2026 17:14
@Dp-Goog
Dp-Goog force-pushed the twa-notification-high-priority branch from dfb1179 to f433fc3 Compare August 7, 2026 17:54
}

@Override
public boolean onNotifyNotificationWithChannel(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What's the purpose of this functionality?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This is mostly a copy of the TWA notification delegation demo that plays an air-horn, with some debug information added, like onCreate() and onDestroy() to know when the service has been created or destroyed, and the logs on L57-60 to track the channel name and importance.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it may be a distraction. I'd expect people to come to this demo looking at how to implement high priority notifications and blindly copy-pasting stuff. In that case do we want them modifying the notifications?

@Dp-Goog
Dp-Goog requested a review from PEConn August 10, 2026 16:20
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.

2 participants