dashboard to view information about the user experience of their app. This approach also rewards developers building high quality apps, since apps with better scores in Android vitals have better discoverability in the Play store.
The table below details the web application crash triggers, the corresponding action and recommended mitigations. The Trusted Web Activity crash event will include a log message viewable in the Android Console with details about which trigger caused the exception and the URL at which the exception occurred to facilitate debugging.
Exception trigger
Action
Recommended mitigations
HTTP 404 or 5xx error code returned on HTTP request for the main document to a trusted origin
Exception raised by the Trusted Web Activity
Make sure your app doesn’t have 404 or 5xx errors
Use a ServiceWorker and handle 404 or 5xx errors using a ServiceWorker fetch event App Not Responding (ANR) events.
Policies. Android apps using Trusted Web Activity must comply with all Play store policies, including for web content in the Trusted Web Activity, including policies for payments in-app purchases and other digital goods.
To ensure the quality of experience, content in a Trusted Web Activity must meet PWA installability criteria and load fast at the start URL. Loading speed is measured using quick start guide helps developers new to Trusted Web Activity and Bubblewrap get going fast.
We are continuously improving Bubblewrap, adding tools and scaffolds to make it easy for developers to build high quality Android apps using Trusted Web Activity and to provide build time warnings for common mistakes.
Posted by PJ McLachlan, Product Manager