docs.rodeo

MDN Web Docs mirror

related_applications

{{QuickLinksWithSubpages("/en-US/docs/Web/Progressive_web_apps/Manifest/Reference")}} {{SeeCompatTable}} 

The related_applications manifest member is used to specify one or more native applications that are related to your web application. It can be used with the prefer_related_applications manifest member, which indicates a preference for installing either a related native application or your web application.

Syntax

/* Related native application on one platform specified by both url and id */
"related_applications": [
  {
    "platform": "play",
    "url": "https://play.google.com/store/apps/details?id=com.example.app1",
    "id": "com.example.app1"
  }
]

/* Related native application on one platform specified only by id */
"related_applications": [
  {
    "platform": "windows",
    "id": "example.app1"
  }
]

/* Related native applications on two platforms */
"related_applications": [
  {
    "platform": "play",
    "url": "https://play.google.com/store/apps/details?id=com.example.app1",
    "id": "com.example.app1"
  },
  {
    "platform": "amazon",
    "url": "https://www.amazon.com/product/dp/B000XA1000"
  }
]

Values

Description

A “related application” is a {{Glossary("native")}}  application that provides functionality similar to your web app, often with additional features or better integration with users’ devices.

The related_applications manifest member lets you identify the platform-specific native applications that are related to your web app. For example, consider you have a native Android app for your product available through the Google Play Store. It provides the same core features as your web app and integrates better with the device’s notification system. You can use related_applications to specify this native Android app in your web app’s manifest file.

Some key points about the related_applications member include:

Examples

This example shows how to specify a related native Android app in your web app’s manifest file. It uses minimal information to identify the native app available on the Google Play Store:

{
  "related_applications": [
    {
      "platform": "play",
      "id": "com.example.app1"
    }
  ]
}

If native versions of your web app are available on both Google Play Store and Windows Store, you can specify them in your web app’s manifest file like so:

{
  "related_applications": [
    {
      "platform": "play",
      "url": "https://play.google.com/store/apps/details?id=com.example.app1",
      "id": "com.example.app1"
    },
    {
      "platform": "windows",
      "url": "https://apps.microsoft.com/store/detail/example-app1/9WZDNCRFHVJL"
    }
  ]
}

If you want to indicate to browsers that you prefer users to be given the option to install your native app, available on the Google App Store, instead of your web app, you can set prefer_related_applications to true. Browsers may then prompt users to install the native Android app instead of your web app.

{
  "prefer_related_applications": true,
  "related_applications": [
    {
      "platform": "play",
      "id": "com.example.app1"
    }
  ]
}

Specifications

{{Specifications}} 

Browser compatibility

{{Compat}} 

See also

In this article

View on MDN