# 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, the Chromium-based default browser on Galaxy phones, installs a PWA in
two ways: a manual **Add shortcut on Home screen** menu item that works for any site, and
an ambient-badging plus icon that appears for a site whose manifest requests `standalone`
or `fullscreen`. Both come from Samsung's own developer documentation, which is thin, so
this entry states only what it documents.

## How it works

Samsung's docs describe two separate install signals rather than one, and a desktop
variant for 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, which gives a Galaxy device docked to a monitor a windowed launch
rather than a 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 below satisfies the badge requirement; the script treats the badge as an
unobservable fact and detects the installed state instead.

### 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.

:::observed
Samsung Internet for Android (English UI): the browser menu item is labelled "Add shortcut
on Home screen", and a site whose manifest sets `display` to `standalone` or `fullscreen`
additionally shows a "+" symbol that opens a small install menu when tapped, as documented
on Samsung's [Progressive Web Apps](https://samsunginternet.github.io/docs/progressive-web-apps)
and [Ambient Badging](https://samsunginternet.github.io/docs/ambient-badging) pages
(Samsung Internet 5.2 and later).
:::

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)