-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need some way to de-duplicate web and native share targets #19
Comments
I prefer the middle approach. it is like the last approach but doesn't tie install prompting together with share. It makes me wonder if maybe the notifications API should be extended somehow instead of adding the getInstalledRelatedApps API. E.g. when requesting notifications having a flag |
Ah, there's a middle approach in between 2 and 3, which is to have
Yeah I kind of thought of this too. It would certainly restrict the set of use cases for getInstalledRelatedApps to precisely what we specify, but since we've not got many good use cases for it anyway, maybe that's a good thing??? (The other use case is to restrict install prompts if your native app is already installed: is that already the behaviour of prefer_related_applications?) I see... so if we tabulate there are really four decisions you might make based on related applications:
Those last three are the domain of |
Yep ... that's actually what I thought 2 was :) Hmmmmm ... as discussed there seem like three approaches:
The third way feels cleanest for some reason, but the second feels like the most flexible. I don't feel strongly. |
If you have both a web app and a native app (on a certain platform), you may want to prevent your web app from showing up as a share target if the user has your native app installed. Otherwise, your app may show up twice in the share picker and be confusing for the user (as it would look identical or near-identical).
This is the exact same problem (with Notifications) that prompted the development of the
navigator.getInstalledRelatedApps
API, so you could programmatically check and disable notifications. However, you can't directly use that with Web Share Target as we've specified it, because it's declarative.Here's a brain-dump of some solutions:
getInstalledRelatedApps
in combination with that API to disable your share target if the native app is installed.share_target.disable_if_app_installed
whose value is a list ofRelatedApplications
. Automatically do not show the share target if any of those apps are installed. Or find some way to point to an existing member ofrelated_applications
.prefer_related_applications
is present, do not show a web share target if any related application is installed.The text was updated successfully, but these errors were encountered: