All articles

Tutorial

Implementing App Shortcuts in Android TWAs via Web Manifest

November 5, 2026 · 5 min read

Native Android applications have long supported app shortcuts, allowing users to long-press the application icon on their home screen to launch specific actions directly. When publishing a Progressive Web App to Google Play as a Trusted Web Activity, you can implement this native-like feature entirely through your web app manifest file. Modern Android devices parse this configuration and generate native OS-level launcher shortcuts automatically.

By leveraging the shortcuts member within your web manifest, you provide deep integration with the Android operating system. This allows users to jump directly to search interfaces, account settings, or writing desks, removing navigation friction and driving higher engagement rates for your application.

The Shortcuts Array in the Web App Manifest

To enable launcher shortcuts, you must declare them in your web application manifest file. The manifest accepts a shortcuts key containing an array of shortcut objects. Each object represents a unique action that will be displayed when the user performs a long-press on the app icon.

Each shortcut object requires a name, which serves as the label displayed to the user, and a url, which specifies the destination path when the shortcut is tapped. You should also include a short_name for compact displays, a description detailing the shortcut purpose, and an array of icon objects defining the images used alongside the text label.

Here is an example structure of a web app manifest containing shortcuts:

{ "name": "Task Manager", "short_name": "Tasks", "start_url": "/", "display": "standalone", "shortcuts": [ { "name": "Create New Task", "short_name": "New Task", "url": "/tasks/new?source=shortcut", "icons": [{ "src": "/icons/new-task.png", "sizes": "192x192" }] }, { "name": "View Calendar", "short_name": "Calendar", "url": "/calendar?source=shortcut", "icons": [{ "src": "/icons/calendar.png", "sizes": "192x192" }] } ] }

How Android Translates Manifest Shortcuts to Native Shortcuts

When your Trusted Web Activity is compiled and installed, the Android system reads the web app manifest via the background host browser provider. Google Chrome extracts the defined shortcuts array and dynamically registers them with the Android launcher framework. Because these shortcuts are managed at the system level, they match the look and feel of native application shortcuts perfectly.

However, the Android operating system imposes specific platform constraints that developers must accommodate. The platform generally limits the total number of shortcuts displayed on a long-press. While the web manifest allows you to declare numerous entries, Android will typically display a maximum of four shortcuts. To ensure a consistent user experience, prioritize your most valuable interactions at the top of the shortcuts array.

Optimising Shortcut Icons for Android Launchers

Just like your primary application launcher icon, shortcut icons require careful design to ensure they render crisply across various Android device form factors. When designing shortcut icons, you should provide high-resolution PNG images. A size of 192x192 pixels is recommended, as it scales down cleanly to match system-defined dimensions.

To prevent visual clipping, ensure that your shortcut icons are designed with safe margins. The Android launcher may mask the icon shapes to conform to system themes, such as rounded squares or circles. Keep critical visual elements centred and use transparent backgrounds to ensure the icons blend seamlessly with the user launcher interface. Including both square and circular design variants in your icon declarations helps Android select the most appropriate match.

Handling Shortcut Navigation and Deep Linking

When a user taps an app shortcut, the Trusted Web Activity launches directly into the declared target URL. To leverage this feature effectively, your web application must be prepared to handle these specific routes smoothly. It is highly recommended to append a unique query parameter to each shortcut URL, such as source=shortcut, to assist with routing and analytics tracking.

Using query parameters allows your application frontend router to detect that the user arrived via a specific shortcut action. This enables your JavaScript code to trigger modal windows, focus input elements, or load targeted datasets instantly upon startup. Additionally, tracking these parameters in your analytics suite provides valuable insights into which shortcut actions are most popular among your Android user base.

Web Manifest Shortcut Properties Supported by Android

PropertyData TypePurposeRequired for Android
nameStringThe primary text label displayed next to the icon in the long-press menu.Yes
short_nameStringAn alternative shorter label used if space on the device launcher is restricted.No
urlStringThe target path loaded when the user taps the shortcut action.Yes
iconsArrayAn array of image objects specifying the icons displayed with the shortcut.Yes
descriptionStringAn accessibility description explaining the action of the shortcut.No

Debugging App Shortcuts on Android Devices

To verify that your shortcuts are functioning correctly, you must test them on an active Android device. Ensure that your progressive web application manifest is deployed to your server and contains no JSON syntax errors. If you make modifications to the shortcuts configuration, the Android host browser may take up to twenty-four hours to detect the changes and update the native launcher shortcuts automatically. For instant testing, you can uninstall the application and clear the host browser cache before performing a fresh installation of the application package.

Ready to ship your Android app?

Paste your PWA URL, get a signed APK and a Google Play ready AAB in minutes.

Build my app