Skip to main content




How a hotel startup created an Android app that relies on web content to dramatically increase user engagement and keep file size low


Updated

Founded in 2013, OYO rooms
It has become one of the largest hotel companies in India, with hotels in hundreds of cities in more than 80 countries. That success was due in part to making your online booking experience as quick and easy as possible.

Until recently, the OYO team offered so much
Progressive web application (PWA)
and a native Android application to achieve that goal. The Android app had a significantly higher share: users converted three times more often than those using the PWA. But users also tended to uninstall the Android app over time due to storage space concerns.

To reduce the Android app's footprint on users' devices while maintaining the benefits of the native experience, the team decided to turn to
Trusted Web Activities (TWA).

What is a TWA?

Before Chrome 72, Android developers who wanted to display web content in their native apps had to use
WebView, which had some major limitations: it is not as fast as Chrome and does not include all of Chrome's APIs and features. So if you wanted a behavior that the WebView rendering engine didn't support, you had to build your own browser around it, which isn't exactly trivial!

Trusted Web Activities (TWA)
Address those limitations by displaying web content directly in Chrome. Breaking down the TWA name helps explain its features:

  • A activity is a screen or view in the user interface of an Android application.
  • TWAs use Chrome to display Web content for application activities.
  • The content of a TWA is trustworthy because it uses
    Digital asset links
    to verify that the same person created the Android application and the displayed web content.

It is easy to confuse PWA and TWA.
PWA use web technologies to create experiences comparable to native applications.
TWA allows you to display a PWA in an Android application container that can be downloaded from the Google Play Store.

Why create a TWA instead of a native application?

More and more Android applications offer content from the developers' own websites. The TWAs recognize that reality by offering the best of the world of native and web applications:

  • They have all the functionality expected from native Android apps, including a home icon, push notifications, and full screen.
  • They offer the performance and features of Chrome.
  • They use the version of Chrome installed on the device, so they always have the latest APIs and features.
  • They use much less storage than a fully native app, which is a concern for many users, especially those with low-end devices.

Running in Chrome also has a number of useful benefits. For example, TWAs share Chrome storage, including cookies, passwords, and everything stored through the
Web storage API. One benefit of this setting is that users stay connected through the browser and the TWA application.

TWA support will soon be available in various Android browsers; both Samsung and FireFox have committed to TWA. You can specify which browser you want your application to use, although it is best to select the user's default browser.

Building OYO Lite

The OYO team wanted to give their users a native app experience without compromising device storage, so they decided to create
OYO Lite, a TWA built on top of your existing PWA.

Getting started with a PWA is essential. Users expect a native-like experience in an application they run from the Android launcher, so web content served in a TWA should provide that experience, including:

  • Fast loading and response times
  • Reliability when the user has limited or no connectivity
  • A unified look and feel (by providing, for example, a splash screen and application color)

If you already have a PWA, the steps to create a basic TWA are designed to be low-effort, even if you've never developed it for Android before. Here's what the OYO team did:

And here is the result:

OYO Lite in action.

For a more detailed tutorial on how to create a basic TWA, see Peter McLachlan and Andre Bandarra's
Google I / O TWA Talk 2019.

For more information on how the OYO team created OYO Lite, including an in-depth look at their approach to creating a splash screen that is accessible to all Android users, take a look at Ankit Jain.
post to Medium.

How a TWA Helped OYO Meet Its Users' Needs

By caching most of its app assets in Chrome, the OYO team was able to reduce the initial download size for OYO Lite to a slim 850 KB. That's only 7% the size of your native Android app!

That small footprint combined with the conveniences of a native downloadable Google Play Store app generated significant gains in user engagement:

  • A conversion rate three times higher than the PWA rate
  • Three times more registered users than PWA, on average
  • A rating of 4.1 on the Google Play Store

And in addition to the benefits for the user, going with a TWA meant that the team had only one code base, which they could easily update without waiting for users to download the latest version of the application.

Create your own TWA

OYO's online booking platform is just a use case for TWA. They can be ideal for many projects currently created as native applications or web pages, from shopping carts and payment flows to FAQs and contact forms.

Check out these links to get started with TWA:

R Marketing Digital