PWAs enable developers to package web apps into Meta Quest applications. Users can download PWAs from the Horizon Store just like any other app.
How does it work?
For Meta Horizon OS, PWAs are built using Bubblewrap, a tool to package your Progressive Web App into an Android App Bundle. With it, you can create an Android application that launches PWAs using “Trusted Web Activity”, a mechanism to access web content from an Android app. Developers also have access to in-app purchase capabilities via the Digital Goods API.
What type of PWAs are supported?
The Meta Horizon Store currently supports immersive WebXR and 2D PWAs. Support for Hybrid PWAs, which switch between 2D and immersive, will be available later. 2D PWAs leverage web content available today while immersive PWAs are web experiences built using WebXR. WebXR PWAs launch directly into immersive MR/VR and provide a similar experience to native MR/VR applications on the Meta Quest.
How do I get started?
If you have an existing WebXR experience, you can start testing the website version of it today using Meta Quest’s built-in web browser, as WebXR PWAs and Quest’s Browser are powered by the same web rendering engine. Remember that PWAs need to adhere to the same policies and Virtual Reality Checks (VRCs) as other apps in the Horizon Store.
The Getting Started with PWAs page lists the preparation work required before you can package your web experience as a PWA.
The PWA Tools and Packaging page describes the required tooling and detailed steps of how you can create a PWA APK package from your existing URL.
The Distribute section provides the steps for submitting your PWA APK to Meta Horizon Store.
A key VRC to be aware of is the Quest.Performance.3 startup time requirement. WebXR experiences typically load assets before a session begins. However, because WebXR PWAs launch directly into immersive mode, pre-loaded assets count against this requirement. For PWAs, it’s a best practice to load as many assets as possible after the WebXR session initiates.
PWA technical requirements
To package your web app as a PWA for Meta Quest, your app must meet the following technical requirements.
Web app manifest
Your app must include a manifest.json (or manifest.webmanifest) file that defines your app’s metadata. At minimum, include:
name and short_name: The display name of your app.
start_url: The URL that loads when your app launches.
display: Set to standalone or fullscreen for immersive experiences.
icons: At least one icon at 512x512 pixels.
orientation: Set to landscape for VR experiences.
Service worker
A service worker is required for PWA functionality. Your service worker should handle:
Caching: Cache critical assets for faster loading. Quest Browser supports the Cache API and IndexedDB for offline storage.
Offline fallback: Provide a fallback page when the network is unavailable.
Limitations on Quest Browser
Be aware of the following limitations when building PWAs for Quest Browser:
Background execution: PWAs do not run in the background when the user switches to another app.
Push notifications: Web push notifications are not supported on Quest Browser.
Storage quota: PWAs have a limited storage quota. Avoid storing large assets locally.
Clipboard API: Limited clipboard support compared to desktop browsers.
WebRTC: Supported, but with limited codec options compared to desktop.
How can I learn more about PWAs?
There are plenty of existing resources you can check out right now:
WebXR - The WebXR Device API lets you develop immersive VR experiences on the web, and is supported in multiple browsers. Some key resources here include our pages on Developer Workflow and Debugging Browser Content.
Bubblewrap - A Command Line Interface (CLI) that helps developers create a Project for an Android application, launching a PWA using a Trusted Web Activity.