A Trusted Web Activity (TWA) is an Android integration that lets a native app display web content from a verified origin in full screen, rendered by the user’s installed browser rather than by an embedded engine. In the mobile web, it is the standard way to package a progressive web app for Google Play while keeping the full browser feature set, shared storage and automatic engine updates.
The defining feature is trust through verification: the app and the website must prove that they belong to the same owner. Once that proof succeeds, the browser hides its toolbar and the page looks and behaves like a native screen. If the proof fails, the same app falls back to a visible address bar, so users always know which site they are on.
How a Trusted Web Activity works on Android
A Trusted Web Activity builds on the Custom Tabs protocol, the Android mechanism through which an app asks a browser to open a page inside the app’s task. The app is little more than a thin launcher activity: it binds to a browser service, requests a TWA session for a start URL and hands control to the browser, which draws the page in its own process.
Before hiding the browser interface, the browser checks Digital Asset Links. The website publishes a file at /.well-known/assetlinks.json that names the Android package name and the SHA-256 fingerprint of the app signing certificate. The app, in turn, declares the website origin in its manifest resources. Only when both sides match does the browser grant full-screen mode.
The sequence below shows what happens between the tap on the launcher icon and the first rendered frame.
| Step | Component | What happens |
|---|---|---|
| 1. Launch | Launcher activity | Shows the splash screen and looks for a supporting browser |
| 2. Bind | Custom Tabs service | Connects to the browser and warms up its engine |
| 3. Verify | Digital Asset Links | Browser fetches assetlinks.json and compares fingerprints |
| 4. Render | Browser process | Loads the start URL in full screen without toolbar |
| 5. Fallback | Custom Tab mode | Shows a minimal URL bar if verification fails |
Because the page runs in the real browser, it shares cookies, storage and service workers with that browser. A user who signed in on the website in Chrome is usually already signed in inside the app, which is a notable difference from an embedded engine.
Requirements and configuration parameters
A working TWA depends on a small set of configuration values that must stay consistent between the app build and the web server. Most failures in production trace back to one of these values drifting after a release or a key change.
| Parameter | Where it is set | Effect |
|---|---|---|
| Start URL | App manifest or Bubblewrap config | First page loaded on launch |
| Package name | Android build and assetlinks.json | Identifies the app during verification |
| Signing fingerprint | assetlinks.json | Must match the key that signs the delivered app |
| Display mode | Launcher metadata | Standalone keeps system bars, immersive hides them |
| Orientation | Launcher metadata | Locks portrait, landscape or follows the device |
| Theme and splash colors | App resources | Control status bar, navigation bar and splash screen |
The signing fingerprint deserves special attention. When an app uses Play App Signing, Google re-signs the uploaded bundle, so the fingerprint in assetlinks.json must include the key used by the store, not only the local upload key. Publishing both fingerprints is a common and safe practice.
Tooling simplifies the setup. The Bubblewrap command-line tool generates an Android project from a web app manifest, and the android-browser-helper library supplies the launcher activity, fallback logic and notification delegation. Several web-based packaging services wrap the same libraries for teams without Android experience.
Trusted Web Activity compared with WebView and Custom Tabs
The TWA sits between two older options, and choosing correctly depends on who controls the content and how much native integration the app needs. A WebView embeds a rendering engine inside the app, while a Custom Tab opens a branded browser view with visible browser controls.
| Option | Rendering engine | Browser interface | Shared browser state | Best fit |
|---|---|---|---|---|
| Trusted Web Activity | User’s browser | Hidden after verification | Yes | First-party PWA in a store listing |
| Custom Tab | User’s browser | Minimal toolbar visible | Yes | Opening third-party links |
| WebView | Embedded system component | None | No | Mixed native and web screens |
| Installed PWA | User’s browser | Hidden | Yes | Distribution outside the store |
The essential trade-off is control versus capability. A WebView lets the app inject JavaScript bridges and intercept requests, but it lacks some web platform features and keeps a separate cookie jar. A TWA offers the full, current browser engine and its web APIs, yet the app cannot inspect or modify the page from native code. iOS has no direct equivalent: SFSafariViewController always shows browser controls, so cross-platform teams usually ship a different wrapper there.
Capabilities available inside a TWA
A Trusted Web Activity inherits almost everything the browser supports, plus a few integrations designed for store-distributed apps. The page itself remains ordinary web code, which means a single codebase serves the website and the Android listing.
- Notification delegation lets web push notifications appear under the app’s name and icon instead of the browser’s.
- Play Billing integration through the Digital Goods API allows in-app purchases that satisfy store payment rules.
- Shortcuts and share targets from the web app manifest map to Android launcher shortcuts and the system share sheet.
- Offline support comes from the site’s service worker, not from native caching.
Browser support is the main variable. Chrome introduced TWA support in 2019, and several other Chromium-based browsers followed, but not every browser on every device implements the protocol. The helper library therefore checks which installed browser can host the session and selects a fallback strategy when none can.
Limitations and common mistakes
Most TWA problems are verification failures that silently turn the app into a Custom Tab with a visible URL bar. Users then see what looks like a broken app, and store reviewers may reject a listing that appears to be a plain website.
| Symptom | Likely cause | Fix |
|---|---|---|
| URL bar appears after release | Store signing key missing from assetlinks.json | Add the Play App Signing fingerprint |
| URL bar on one subdomain only | Origin not listed in the app | Declare every additional origin and its asset file |
| Blank or error screen offline | No service worker fallback | Cache an offline page in the service worker |
| Notifications show browser branding | Delegation not configured | Enable notification delegation in the helper library |
| App fails on some devices | No TWA-capable browser installed | Configure a WebView or Custom Tab fallback |
Beyond these fixes, teams should accept a few structural limits. Native code cannot read the page’s DOM, so features that need deep device access still require a native module or a different architecture. Store policies apply in full, which means the web content must meet app store quality and content rules, not only web standards. Finally, the user’s browser choice shapes rendering, so testing across the major supporting browsers is part of release work.
Stripped to the essentials
A Trusted Web Activity is a way to put a website into the Android app store and make it feel like a normal app. The app is mostly an empty frame. When someone opens it, the phone’s own browser fills that frame with the website, but without the address bar and buttons that usually surround it.
The browser only hides its controls after checking that the website and the app have the same owner. Think of it as a matching pair of keys: one key is inside the app, the other is on the website. If the keys fit, the page looks like an app; if they do not, the browser shows the web address so nobody can be fooled.
Where it is applied
A regional public transport operator already runs a progressive web app for timetables, ticket purchases and service alerts. Passengers keep asking for an app in Google Play, but the operator has no Android developers and does not want to maintain a second codebase.
A web developer uses Bubblewrap to generate the Android project from the existing manifest, sets the start URL to the journey planner and publishes assetlinks.json with both signing fingerprints. Notification delegation turns the existing web push alerts about delays into notifications that carry the operator’s own icon.
The result is a store listing built in about two weeks that loads the same pages as the website. Fixes deployed to the web server reach app users immediately, without a new release, and passengers who were already signed in through Chrome stay signed in inside the app.