Skip to content

[Web Install] Launching already installed app #849

Open

Description

The Web Install explainer says that getInstalledRelatedApps can be used to check if the app is already installed, and in such case, hide the Install button.

However, if instead of hiding we would like to show a "Launch" button, it seems that this isn't a use case currently supported, but I think it is a very valuable one. You can achieve this with custom protocol handlers, but that is much more invasive and prone to errors. I think as part of this spec it would be nice to add an open() function to the returned object from getInstalledRelatedApps to allow it to be launched.

Activity

  1. added
    Web Install API
    on Aug 2, 2024
  2. amandabaker commented on Aug 5, 2024

    @amandabaker
    Member

    I don't see it mentioned in the explainer, but we've discussed using navigator.install() to open apps as well. This was intended to address the issue where a user installs the app from one source (browser UI or web store), and later tries to install it again from a different web store via navigator.install(). If the API rejected with an AbortError and didn't offer to open the already-installed app, then it would be both a bad look for the web store and an inconvenience for users.

    Instead, we proposed handling this scenario by allowing the UA to request to open the app, resolving the promise if the user accepts, or rejecting if the user cancels. Then subsequent calls to getInstalledApps() could list the "newly installed" app so the store knew to show an "Open" button instead of an "Install" button. Diego Gonzalez (@diekus) Do you remember if anyone had any pushback about this approach or should it be safe to include in the explainer?

    That said, it wouldn't be intuitive to use navigator.install() to open an already-installed app, so it may make sense to add the navigator.open() you suggested which:

    • has the same params as install
    • only prompts the user to open the app if it is installed and was installed by this origin (i.e. is included in the result of navigator.getInstalledApps()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Web Install API

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions