# getInstalledRelatedApps(): detecting an installed native or PWA counterpart

> How navigator.getInstalledRelatedApps() lets a web app check whether a related Android, UWP, or PWA counterpart declared in related_applications is already installed, and the verification each platform requires.

**In one line:** `navigator.getInstalledRelatedApps()` resolves with the related,
platform-specific apps or PWAs — declared in the calling web app's manifest — that are
already installed on the user's device.

## What it checks for

`getInstalledRelatedApps()` can be used to check for the installation of Universal
Windows Platform (UWP) apps, Android apps, and PWAs that are related to the web app
calling this method. To associate the invoking web app with a platform-specific app or
PWA, two things must be done:

1. The invoking web app's manifest must list the related Android app, UWP app, or PWA in
   its own `related_applications` member.
2. The platform-specific app or PWA must have its relationship with the invoking app
   defined, verified in a platform-specific way:
   - An Android app defines the relationship via the Digital Asset Links system.
   - A Windows UWP app defines it via URI Handlers.
   - A PWA defines it either through a self-referencing entry in its own
     `related_applications` member (specifying `platform` and `id`), or — for an app
     outside the PWA's own scope checking whether it is installed on Android — via an
     `assetlinks.json` file in that PWA's `/.well-known/` directory.

## Return value

`getInstalledRelatedApps()` takes no parameters and returns a promise that fulfills with
an array of objects, one per installed related app, each of which can include:

- **`id`** (optional) — a platform-specific string identifying the app.
- **`platform`** — the ecosystem or OS the app belongs to: `"chrome_web_store"`,
  `"play"`, `"chromeos_play"`, `"webapp"`, `"windows"`, `"f-droid"`, or `"amazon"`.
- **`url`** (optional) — the URL associated with the app, typically where it can be
  installed or read about.
- **`version`** (optional) — the related app's version.

```js
const relatedApps = await navigator.getInstalledRelatedApps();
const psApp = relatedApps.find((app) => app.id === 'com.example.myapp');
if (psApp) {
  // A related platform-specific app is already installed.
}
```

Calling the method outside a top-level browsing context throws an `InvalidStateError`
`DOMException`.

## Practical checklist

- [ ] List the related Android app, UWP app, or PWA in the calling web app's own
      manifest `related_applications` member.
- [ ] Set up the platform-specific verification the related app needs: Digital Asset
      Links for Android, URI Handlers for UWP, or a self-referencing
      `related_applications` entry (or `/.well-known/assetlinks.json`) for a related PWA.
- [ ] Call `getInstalledRelatedApps()` only from a top-level browsing context to avoid
      an `InvalidStateError`.
- [ ] Use the resolved `platform`/`id` values to decide whether to suppress your own
      install prompt or feature (for example, skip prompting to install the PWA when a
      native counterpart is already present).

## Cross-references

- [The install prompt](/reference/installation/install-prompt/) — combining this check
  with `beforeinstallprompt` to suppress prompting when a related app is installed