Web wrappers, or web apps packed randomly into native apps for distribution in app stores, have been around on Android for more than a decade. Google created a new method of converting web apps to native apps last year, with the introduction of Trusted Web Activities, and now Microsoft has updated its PWABuilder tool to take advantage of new web features.
If you’re not familiar with them, Trusted Web Activities allows developers to run web apps within Chrome’s custom tabs, without the address bar or any other part of Chrome visible. Unlike WebViews, which have been used for more than a decade to embed web content in native apps, Trusted Web Activities supports push notifications, offline access, and everything else a web app can do within Chrome.
However, there is still a major problem with TWA apps – they still need to be compiled as native apps, usually with the full Android Studio SDK. Google doesn’t allow developers to generate APKs and app packages by simply entering the app’s web address in the Play Console, as Samsung does with the Galaxy Store.
Fortunately, Google is working to improve the tools that are commonly used to build trusted web activity applications. Some Google employees (the documentation explicitly says “This is not a Google product”) have been working on Bubblewrap, a command line application for building TWA projects. Developers who use Bubblewrap to build native apps don’t need to have the entire Android SDK installed, just Node.js.
Example of a PWA (PhotoStack.app) with application shortcuts
Meanwhile, Microsoft has updated its web-based PWABuilder tool to use Bubblewrap under the hood, which means more features are available. For example, PWABuilder can now detect when a web application supports shortcuts to the home screen and will add the same shortcuts to the compiled APK. PWABuilder now also has options to change the appearance of Android status / navigation bars, the app’s home screen, alternative behavior, and more.
New options available in PWABuilder
While it would be nice to see a build tool built into the Google Play Console, at least there are now plenty of options for generating APKs from progressive web apps that don’t require you to install Android Studio and play around with XML resources.