Description
what is a Trusted Web Activity?
TL;DR A Trusted Web Activity allows Chrome (v72 or later) to run a website in fullscreen mode without a browser toolbar within an APK (Android Package).
How? The underlying technology is based on the Custom Tabs protocol, which is already used to embed web content within native apps. For example, you might click a link in the Twitter app, but never actually leave the app to view the content. A TWA allows a developer to verify ownership of first-party web content by uploading a special file called a trusted asset link to the hosting server. It can then be easily packaged for Android making it indistinguishable from a true native app and discoverable on the Play Store.
Why? While this approach is very new on the scene, it offers a promising alternative to webview-based hybrid apps (Ionic/Cordova). Many hybrid apps are just PWAs wrapped up as a native package, but the webview environment is sandboxed, so TWAs offer the following benefits:
- OAuth requests not blocked (this is awesome).
- Always up-to-date content, no need to cut a new release when content changes.
- Share cookies, local storage, saved settings and all PWA features with the preferred browser.