TWA? FTW!

Levent Digital
Levent Digital
Published in
2 min readAug 9, 2020
Web x Android Google Developers

Trusted Web Activity (TWA) is the chrome browser without browser UI that loads web app from specified URL.

TWA offers building blocks to display fullscreen web content in an android app. Faster than the WebView, feature-complete, evergreen and easier to use. Optimised for showing first-party web content.

Why is the TWA trusted?
Because it’s cryptographically verified that the app owner is the same content owner, using digital asset links.

What’s good in it?
TWA shares storage with the chrome browsers including cookies & origin setting such as notification opt-in status.

If a user previously uses a chrome browser and later install the app from google play, it will magically import the setting, so the user will have the same experience just like with the chrome.

95% compatible with android device!

Rule of thumb on building TWA
Build a great Progressive Web App (PWA) that consist of three parts:
1. Loads and interact instantly.
2. Works reliably with intermittent connectivity.
3. Enhance to device features, looks and feels like belongs on the user’s device.

How to measure a great PWA?
EZ! Use Lighthouse chrome browser extension to see the performance, quality, and correctness of PWA. Lighthouse will also provide a checklist to understand the steps needed to improve performance score.

Lighthouse report for Tokopedia (m.tokopedia.com)

That shows a great implementation of PWA from Tokopedia Product Team.

At last, a TWA is the best way to include web content in your android app. It’s a replacement for WebView anywhere you have full-screen content.

Learn more with us by simply shoot an email at connect@levent.id

This study note was compiled from Google I/O 2019 that can be found here. Thanks to Peter McLachlan and Andre Bandarra for an amazing presentation.

--

--