# PWAs on Samsung Internet

> How Samsung Internet installs PWAs: the Add shortcut on Home screen menu item, the ambient-badging plus icon for standalone or fullscreen manifests, and DeX.

Samsung Internet installs a PWA with the **Add shortcut on Home screen** menu item. An
ambient-badging plus icon also appears on sites that meet Samsung's requirements, which
include HTTPS, a registered service worker, and a manifest that sets `display` to `standalone` or
`fullscreen`.

## How it works

Samsung documents separate menu and badge install signals, plus desktop installation on DeX.

### Manual add from the menu

In Samsung Internet for Android the user opens the browser menu and chooses **Add shortcut
on Home screen** (English UI). If the manifest declares `icons` and `short_name`, the
[Progressive Web Apps page](https://samsunginternet.github.io/docs/progressive-web-apps)
states that the chosen icon appears on the Home screen with the chosen short name. Web App
Manifest support arrived in Samsung Internet 4, as did service workers and the Push and
Notification APIs.

### Ambient badging

The [Ambient Badging page](https://samsunginternet.github.io/docs/ambient-badging) says the
browser displays a "+" symbol to indicate a site can be installed and that tapping it opens
a small menu. Among the listed requirements is a manifest with `display` set to
`standalone` or `fullscreen`; a site that keeps the default `browser` display gets the menu
item but not the badge. Ambient badging was introduced in Samsung Internet 5.2.

### Samsung DeX

The same page family notes that in Samsung Internet running on Samsung DeX, web apps can be
added to the desktop, so a Galaxy device docked to a monitor launches them in windows. This replaces the Home screen tile.

### Install events

Samsung's documentation does not mention `beforeinstallprompt`. MDN's
[compatibility data](https://developer.mozilla.org/en-US/docs/Web/API/BeforeInstallPromptEvent)
lists Samsung Internet 4.0 as supporting the event, consistent with its Chromium base, so
code written for Chrome's custom install button is expected to run; test on a Galaxy
device before relying on it, because Samsung's own UI may show the badge regardless.

## Examples

The manifest satisfies the badge requirement. The script detects whether the app is
running installed; it cannot observe the badge.

### A manifest that qualifies for the plus icon

Only `display` matters for the badge, but `short_name` and `icons` decide what the manual
path puts on the Home screen.

```json
{
  "name": "Field Notes",
  "short_name": "Notes",
  "start_url": "/",
  "display": "standalone",
  "icons": [{ "src": "/icon-512.png", "sizes": "512x512", "type": "image/png" }]
}
```

Keep `short_name` short: Samsung's docs name it as the label the Home screen shows next to
the icon, and Android launchers truncate long labels.

### Detecting the installed window without trusting fullscreen

Samsung documents no API for asking whether the badge is showing, so the page can only
learn that it already runs installed. `(display-mode: fullscreen)` also matches a plain
page that called the Fullscreen API, which is why only `standalone` counts here.

```js
function isRunningInstalled() {
  if (typeof window.matchMedia !== 'function') {
    return false; // cannot query: assume an ordinary tab
  }
  return window.matchMedia('(display-mode: standalone)').matches;
}

if (!isRunningInstalled()) {
  // Point at the browser menu; there is no documented way to open it from script.
  document.getElementById('install-hint').hidden = false;
}
```

A site that ships `display: fullscreen` for the badge should still check `standalone`
here: MDN's [`display-mode`](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/display-mode)
page states that `fullscreen` also matches a page put in fullscreen mode by the Fullscreen
API.

## Observed behaviour

Samsung names the two entry points differently, and only one of them is manifest-driven.

:::note
Samsung's [Progressive Web Apps](https://samsunginternet.github.io/docs/progressive-web-apps)
page says the Samsung Internet for Android menu offers "Add shortcut on Home screen". Its
[Ambient Badging](https://samsunginternet.github.io/docs/ambient-badging) page says the
browser shows a "+" symbol that opens a small menu when a site has HTTPS, a registered
service worker, and a manifest with `name` or `short_name`, `start_url`, an icon of at
least 144x144, and `display` set to `standalone` or `fullscreen`. Ambient Badging was
introduced in Samsung Internet 5.2.
:::

A registered service worker does not by itself cache anything for offline use; Samsung's
docs describe it as a network proxy that could return a response from a cache, and offline
behaviour appears only once a `fetch` handler implements it.

## See also

- [PWAs on Chrome and Android](/reference/platforms/chrome-android/)
- [Install prompt](/reference/installation/install-prompt/)
- [Service worker caching strategies](/reference/service-worker/caching-strategies/)
- [Progressive Web Apps](https://samsunginternet.github.io/docs/progressive-web-apps) (samsunginternet.github.io)
- [Ambient Badging](https://samsunginternet.github.io/docs/ambient-badging) (samsunginternet.github.io)