If Digital Asset Links verification fails, Chrome shows your site as a Custom Tab (URL bar visible), not full-screen TWA. The Quick start to Trusted Web Activities describes this behavior when you first install a Bubblewrap build.
TWA trust is bidirectional: the Android app declares the site, and the site hosts /.well-known/assetlinks.json pointing at the app’s package name and signing certificate SHA-256 fingerprint.
Content in a Trusted Web activity is trusted – the app and the site it opens are expected to come from the same developer. (This is verified using Digital Asset Links.)
— Google Chrome, Overview
For a typical TWA, the web file uses delegate_permission/common.handle_all_urls:
"relation" : [ "delegate_permission/common.handle_all_urls" ],
"namespace" : "android_app" ,
"package_name" : "com.your.package_name" ,
"sha256_cert_fingerprints" : [ "XX:XX:XX:..." ]
— pattern from Android Concepts (for Web Developers)
The app side adds asset_statements in strings.xml and links it from AndroidManifest.xml, as in the Integration Guide .
With Play App Signing , the fingerprint on a Play-downloaded APK differs from the key Bubblewrap created at init time.
The important thing to note is that the fingerprints associated with your signing and upload keys will be different.
— Google Chrome, Android Concepts (for Web Developers)
App signing key (Play Console → Setup → App Integrity): APKs users install from the Play Store.
Upload key : local bubblewrap build APKs or AABs you sideload during development.
Including both fingerprints in assetlinks.json avoids “works locally but shows the Custom Tab bar in production.” Use Adding more keys or the Play Store Asset Link Tool flow described in the same doc.
When users leave your primary origin, Chrome normally shows Custom Tab UI. You can validate multiple origins so navigation stays full-screen across domains you control (for example shop and checkout).
Trusted Web Activities allow developers to validate multiple origins, and the user will remain in full-screen when navigating across those origins.
— Google Chrome, Multi-Origin Trusted Web Activities
Each origin needs its own assetlinks.json; the app lists every origin in asset_statements or uses ADDITIONAL_TRUSTED_ORIGINS / setAdditionalTrustedOrigins() as in Multi-Origin Trusted Web Activities .
For non–CORS-approvelisted headers on Custom Tab intents, Chrome 86+ allows them when a Digital Asset Link uses delegate_permission/common.use_as_origin—see Add extra HTTP Request Headers .
TWA postMessage (Chrome 115+) also expects use_as_origin in assetlinks.json; see PostMessage for TWA .
Google’s recommended stack:
Piece
Role
androidx.browser
Low-level Custom Tabs API (Getting started )
com.google.androidbrowserhelper:androidbrowserhelper
TWA launcher, fallbacks, multi-domain helpers (android-browser-helper )
Bubblewrap (@bubblewrap/cli)
Generate and build a TWA wrapper from a Web App Manifest—no Android/Java required (Quick start )
android-browser-helper is now the recommended library to build applications that use Trusted Web Activity.
— Google Chrome, android-browser-helper
Lay of the Land positions Bubblewrap for “just wrap my PWA,” and android-browser-helper when you already have an Android app or need customization Bubblewrap does not support.
Add androidx.browser:browser and launch with CustomTabsIntent.Builder:
CustomTabsIntent intent = new CustomTabsIntent. Builder (). build ();
intent. launchUrl (MainActivity.this, Uri. parse ( "https://developers.android.com" ));
— from Getting started
If the default browser does not implement Custom Tabs, the intent still opens via ACTION_VIEW with customization extras—behavior called out in the same guide.
Use CustomTabsClient.getPackageName() before launch; if it returns null, fall back to a plain ACTION_VIEW intent (Check if an Android device has a browser that supports Custom Tabs ).
On API 30+ , declare a <queries> entry for android.support.customtabs.action.CustomTabsService or queryIntentActivities may return nothing (same doc ).
Defensive coding
Custom Tabs are not identical across browsers: feature tables in Browser support are illustrative, and you cannot programmatically query every feature on device.
Passing a CustomTabsSession to the builder forces the link into a Custom Tab even when a native app could handle the URL (Getting started ). Use setSendToExternalDefaultHandlerEnabled(true) after binding the Custom Tabs service if you want native app handlers again (Warm-up and pre-fetch ).
For first-party WebView content that links off-domain, shouldOverrideUrlLoading / routing to CustomTabsIntent keeps third-party pages in the browser cookie jar (Open a Custom Tab for links in a WebView ).
bubblewrap init --manifest=https://my-twa.com/manifest.json
— from Quick start to Trusted Web Activities
Until assetlinks.json is live with the correct fingerprint, the wrapper opens as a Custom Tab.
The Integration Guide wires com.google.androidbrowserhelper.trusted.LauncherActivity, DEFAULT_URL metadata, intent filters, asset_statements, then publishing with verified links.
Note in the guide: seeing the URL bar before DAL is complete is expected, not a bug.
TWA does not expose cookies or localStorage to the host app. Pass data via launch URL query parameters (Passing Information to a Trusted Web Activity using Query Parameters ) or postMessage after DAL setup (PostMessage for TWA ).
Web Share Target in TWA needs android-browser-helper ≥ 2.0.1, manifest SEND filters, and a escaped share_target JSON string (Enable Web Share Target in Trusted Web Activity ).
Without a registered service worker, the first cold start offline may show the generic network error. An offline-first custom LauncherActivity can gate launch on connectivity (Offline-First Trusted Web Activities ).
Sites can deep-link into installed apps with intent: URLs and optional S.browser_fallback_url (Android Intents with Chrome ). Chrome requires a user gesture and will not launch external apps from timer-driven navigation without one.
Wrong SHA-256 in assetlinks.json — Play signing vs local upload key (Android Concepts ).
JSON syntax — strict parser; trailing commas break verification (Adding more keys ).
File not at site root — must be https://domain/.well-known/assetlinks.json (Integration Guide ).
Assuming all Custom Tab features on every browser — check Browser support .
Filtered cross-origin headers — non-approvelisted headers need use_as_origin validation (Add extra HTTP Request Headers ).
Debug DAL failures:
adb logcat -v brief | grep -e OriginVerifier -e digital_asset_links
— from Android Concepts (for Web Developers)
For which browser handles TWA:
adb logcat -v brief | grep -e TWAProviderPicker
— from Quick start to Trusted Web Activities
Open https://your-domain/.well-known/assetlinks.json in a browser and confirm HTTP 200, Content-Type: application/json, and the correct package_name and SHA-256 for how the APK was signed (Android Concepts (for Web Developers) ).
Install your APK or Play build and confirm full-screen TWA (no URL bar) on your validated origin (Integration Guide ).
Run CustomTabsClient.getPackageName() on a test device; if null, test your ACTION_VIEW fallback (Check if an Android device has a browser that supports Custom Tabs ).
Inspect OriginVerifier / digital_asset_links log lines after a failed launch (Android Concepts (for Web Developers) ).
You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact wording you are asking about.