Web apps and pinned shortcuts
What happens when somebody taps "Add to home screen" in a browser: where the icon lands, how it behaves, and how a theme can tell it apart from an app.
On this page
A browser can ask the home screen to keep an icon for a website. Chrome calls it Add to home screen or Install, other apps use the same mechanism for a chat, a document or a playlist. Android calls the result a pinned shortcut, and this launcher treats one as an ordinary entry: it sits in grids, goes into folders, can be dragged between pages and appears in the app list next to installed apps.
This page is for readers wondering where their icon went, and for theme authors who want to show or hide these entries deliberately.
How one is created#
The browser asks, the launcher confirms, the launcher places it. Nothing is added silently.
- In the browser, the page menu offers Add to home screen (a bookmark) or Install (a web app). Both take the same route from here.
- The launcher shows a small sheet with the icon and the name that the browser proposed. Nothing is pinned until Add is tapped.
- The icon is placed, and a short message says where it went.
The menu entry only appears when this launcher is the current home app. Android answers the browser's question "is pinning supported here" by looking at the default home app alone, so on a device where the launcher is installed but not selected, the browser hides the entry entirely and there is nothing to press. See how do I make this the home screen.
Where the icon lands#
The launcher looks for a place in this order:
- The last auto filling grid, the same one that receives newly installed apps: first a gap, otherwise appended up to the number of cells that actually fit.
- Otherwise a free cell in the last manual grid on a home page. Nothing is appended here: a grid without
autoFillis a piece of theme design, and a ninth icon in an eight cell row would simply be cut off. - Otherwise nowhere in particular, and the message says so. The shortcut still exists and is still reachable, because it appears in the app list like an app.
Template pages and the dock are skipped. An icon dropped on a template page would end up on every page later created from it, and the dock is built from role slots that belong to the theme.
Step three is the reason nothing can get lost: Android holds the pin, not the theme file. Even a theme with no grid at all still shows the entry in whatever app list it has.
How it behaves once it is there#
Like an app, in almost every respect. It can be dragged between pages, dropped into a folder, rearranged inside a grid, found by searching the app list, and it takes the icon shape of the theme like everything else.
The differences are the ones that follow from it not being an app:
| App | Pinned shortcut | |
|---|---|---|
| Opened by | its own launcher activity | the app that created it |
| Long press menu | App info, Uninstall | Delete shortcut |
| Removed from a grid | icon goes, app stays installed | icon goes, shortcut stays in the app list |
| Deleted | uninstalled through the system | Delete shortcut, gone everywhere |
| Survives a theme change | yes | yes, though its position in a grid does not |
| Travels with an exported theme | yes | no, see below |
Remove and Delete shortcut are deliberately two things. Removing an app icon from the home screen leaves the app installed, and a shortcut behaves the same way: it goes back to being just an entry in the app list. Delete shortcut is the other one, it releases the pin and the entry disappears everywhere.
Every pinned shortcut on the device is also listed under Settings → Pinned shortcuts, with one action each. That list comes straight from Android rather than from the theme, so it is the reliable way to get rid of one that a theme is currently not showing anywhere.
When the app behind it goes#
A shortcut belongs to the app that created it. Uninstall that app and Android removes its shortcuts with it; a slot pointing at one then renders as an empty cell. Unlike a package name, a shortcut cannot come back on reinstallation, because the identifier was only ever valid on this device.
Telling them apart in a theme#
Inside an app field, app_is_shortcut is 1 for a pinned shortcut and 0 for an installed app. It exists because app_package is not what you would expect: for a shortcut it names the host app, so a bookmark made in Chrome reports com.android.chrome. A filter formula meant to hide the browser would otherwise take every web app with it.
Hide shortcuts in a grid:
$app_is_shortcut == 0$A page that shows only web apps, which works because the entries carry their own labels:
$app_is_shortcut == 1$Everything else in an app context works unchanged: app_name is the label the browser proposed, app_profile is the profile it belongs to, app_badge is 0 because a shortcut has no notifications of its own.
Icons#
A shortcut icon is a finished picture, not an adaptive icon, so nobody masks it. The launcher does that itself: the picture becomes the motif, its edge colour becomes the plate behind it, and the result takes either the theme's icon shape or, when the theme does not set one, the shape the system uses for apps. A dark web app icon becomes a dark circle rather than a hard square between round icons.
Icon packs do not apply. A pack maps package names to pictures, and the package behind a shortcut is the browser, which would give every web app the same icon.
What leaves the device, and what does not#
Pinned shortcuts are removed from a theme when it is exported or published, and they are kept out of the screenshots the app renders for a store listing.
Two reasons, both of which apply on their own. A shortcut identifier is only meaningful on the device holding the pin, so it would arrive elsewhere as a dead tile. And behind a web app stands a page somebody visited: a theme is a layout to share, not a reading history. If you publish a theme, check the preview images anyway, that is the moment such things are noticed.
Documentation for launcher 0.1.0-alpha Android 12 and later last updated