Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Support Android Intent URLs #1132

Closed
mcomella opened this issue Oct 22, 2018 · 9 comments
Closed

Support Android Intent URLs #1132

mcomella opened this issue Oct 22, 2018 · 9 comments
Assignees
Labels
<engine-gecko> Component: browser-engine-gecko <engine-system> Component: browser-engine-system (WebView) 🌟 feature New functionality and improvements 🐉 Fenix Feature needed for Fenix P1
Milestone

Comments

@mcomella
Copy link
Contributor

mcomella commented Oct 22, 2018

The Android Intent URL spec lets web pages open Android apps. afaict, this is not currently built into components (ag browser_fallback_url) nor do the products handle such a case. If so, this regresses existing Focus and Fire TV functionality). This functionality is also supported in Fennec.

Fennec's behavior was roughly the following:

  • Try to open app for intent. Prompt user first that they may be leaving the app.
  • If there is no app, try to load the provided fallback URL, if relevant
  • If there is no fallback URL, try to open the app on the market if relevant (note: some devices do not have the Play Store or other market so don't assume they do)
  • If it fails, handle the link such that no action occurs (i.e. no error page is shown). Chrome has this behavior and many sites rely on it (see fennec code for details) such as clicking Facebook messenger links

See the old Focus, or Fennec, implementations for details. This behavior may be outdated and we may want to reaudit (e.g. is searching the store the best behavior?).

Test pages:

  • m.facebook.com (click messenger)

┆Issue is synchronized with this Jira Task

@mcomella
Copy link
Contributor Author

I tested on Focus and it appears that GeckoView will prompt to find an app to open a link, which is a different behavior than the system WebView: maybe I am mistaken that this is not handled and that this needs to be resolved at the app level.

I have not tested on Fire TV: I haven't seen this use case being used yet.

@mcomella
Copy link
Contributor Author

Filed mozilla-mobile/focus-android#3710 and mozilla-mobile/firefox-tv#1330 against the specific products.

@pocmo pocmo added 🌟 feature New functionality and improvements <engine-gecko> Component: browser-engine-gecko <engine-system> Component: browser-engine-system (WebView) labels Oct 23, 2018
@pocmo pocmo added this to the ⚖️ Planning milestone Oct 23, 2018
@buttercookie42
Copy link

Prompt user first that they may be leaving the app.

The prompt only happens during private browsing, though.

@vesta0
Copy link
Collaborator

vesta0 commented May 6, 2019

@jhugman
Copy link
Contributor

jhugman commented May 10, 2019

Broken down in to #2974, #2975 #2976

@Natim
Copy link

Natim commented Sep 10, 2019

I have to say that as of the last stable I wasn't able to open links in app. Am I looking at the right place? Will it be part of the next release?

@andreicristianpetcu
Copy link

Are you doing this https://twitter.com/FirefoxPreview/status/1152896874967425025 @Natim?
If it does not work for you, please report a new bug and mention the site you are having issues with https://github.com/mozilla-mobile/android-components/issues

@Natim
Copy link

Natim commented Sep 10, 2019

No, never met this menu!!!

I was looking there:

image

@uniquePWD
Copy link

Is there an open bug for actually supporting Android Intents as opposed to this workaround?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
<engine-gecko> Component: browser-engine-gecko <engine-system> Component: browser-engine-system (WebView) 🌟 feature New functionality and improvements 🐉 Fenix Feature needed for Fenix P1
Projects
None yet
Development

No branches or pull requests

9 participants