Android-components: Support Android Intent URLs

Created on 23 Oct 2018  路  9Comments  路  Source: mozilla-mobile/android-components

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)
<engine-gecko> <engine-system> P1 馃専 feature 馃悏 Fenix

Most helpful comment

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

All 9 comments

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.

Prompt user first that they may be leaving the app.

The prompt only happens during private browsing, though.

Broken down in to #2974, #2975 #2976

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?

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

No, never met this menu!!!

I was looking there:

image

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mcarare picture mcarare  路  5Comments

mitchhentges picture mitchhentges  路  5Comments

jonalmeida picture jonalmeida  路  4Comments

pocmo picture pocmo  路  3Comments

boek picture boek  路  3Comments