You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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. @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()
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.
The text was updated successfully, but these errors were encountered: