INTRODUCTIONS

WebView gives developers access to modern HTML, CSS, and JavaScript inside their Android apps, and allows content to be shipped inside the APK or hosted on the internet. It’s one of Android’s most flexible and powerful components, which can be used for most of the use-cases where web content is included in an Android app. From powering ad services like AdMob to building and shipping complete HTML5 games that use modern APIs such as WebGL.

App browser challange

Over time, more and more developers have built brower experiences incorporating third-party content into their Android application,

with the goal of creating a more seamless experience for their users when navigating to third-party websites. Those experiences became known as in-app browsers.

CUSTOM TAB

Custom Tabs was introduced in Chrome 45 and allows developers to use a tab from the user’s default browser as part of their application. Custom Tabs was originally launched by Chrome, and was therefore known as “Chrome Custom Tabs”. Today it’s an Android API and most popular browsers support Custom Tabs, including Chrome, Firefox, Edge, and Samsung Internet, so it’s more appropriate to just call it “Custom Tabs”.

TRUSTED WEB ACTIVITY

Custom Tabs has support for all modern web capabilities and APIs but, since it was primarily designed to open third-party content, it has a toolbar on the top that tells the users which URL they are visiting, as well as the lock icon indicating whether the site is secure.

When opening an app’s own experience, the toolbar prevents the application from feeling like it is integrated with the operating system.

Limitations of the current solutions

Developer feedback showed a need for the platform compatibility of Custom Tabs combined with the flexibility of WebView so they could, for instance, access the DOM or inject JavaScript, into their in-app browsers.

Custom Tabs is effectively a tab rendered by the user’s browser, with a custom UI or with no UI at all. This means that the browser needs to honour the user’s expectations around privacy and security towards the browser, making some of those features impossible.