Open Bug 1812827 Opened 2 years ago Updated 11 days ago

Problem when trying to open intent

Categories

(Fenix :: General, defect)

All
Android
defect

Tracking

(Not tracked)

People

(Reporter: csadilek, Unassigned)

References

Details

Attachments

(1 obsolete file)

From github: https://github.com/mozilla-mobile/fenix/issues/23397.

Steps to reproduce

  1. Open a link on a website that uses an intent to direct users towards an app using a fallback url
  2. The link won't open the app if S.browser_fallback_url is provided to the Google Play Store
    • It always opens the Google Play Store despite the app being installed on the device
  3. Attempt using the same intent but without providing S.browser_fallback_url
    • It works (opens the app) but we lose the ability to provide a fallback URL to the Google Play Store

Expected behaviour

When the package of the app is available on the device it should open the app. If the app isn't available the link should redirect to the fallback URL (i.e. opening the Play Store link provided as fallback)

Actual behaviour

The behavior matches the expectation on Chrome/Chromium based browsers (tested on Chrome/Edge). On Firefox we're experiencing always being redirected to the S.browser_fallback_url if provided. It works without the fallback url but we lose on the functionality when users don't have the target app installed.

Here's an example intent that we're using for our open beta app (line breaks added for readability):

intent://scan/#Intent;
action=android.intent.action.SEND;
type=text/plain;
S.browser_fallback_url=https://play.google.com/store/apps/details?id=com.forem.android;
S.android.intent.extra.TEXT=https://forem.dev/;
scheme=com.forem.app;
package=com.forem.android;
end

Device name

Samsung A21s

Android version

Android 11

Firefox release type

Firefox

Firefox version

96.2.0

Device logs

No crash detected

Additional information

This bug report from a previous stage in the Firefox browser project mentions this problem was solved but I can't seem to make this work and we've had multiple collaborators confirmed this bug is happening for them too.

Should the Intent structure be different from how Chrome handles it? This site documents the structure Chrome expects, but is this documented for Firefox somewhere?

Thanks for the help.

┆Issue is synchronized with this Jira Task

Change performed by the Move to Bugzilla add-on.

See Also: → 1837286

Hi,

I have the same issue with opening intents on Firefox for Android (Firefox 115.2.1) tested on Android 12 (Pixel3a) and Android 8.1.0 (Nexus 6P).

App installed
preparesedev://test Opens app
intent://test#Intent;scheme=preparesedev;package=io.entidad.apps.esencial.accp.developerapp;end Opens app
intent://test#Intent;scheme=preparesedev;package=io.entidad.apps.esencial.accp.developerapp;S.browser_fallback_url=http%3A%2F%2Fstephanbruijnis.dev%2Fdocs;end Opens fallback

App not installed
preparesedev://test Nothing happens
intent://test#Intent;scheme=preparesedev;package=io.entidad.apps.esencial.accp.developerapp;end Opens Google Play store
intent://test#Intent;scheme=preparesedev;package=io.entidad.apps.esencial.accp.developerapp;S.browser_fallback_url=http%3A%2F%2Fstephanbruijnis.dev%2Fdocs;end Opens fallback

The issue is with the scenario where the app is installed but it still opens the fallback URL. Chromium (Chrome/Edge) opens the app with the intent if installed, which is the expected behaviour.

With kind regards,
Stephan

(In reply to Stephan Bruijnis from comment #1)

Hi,

I have the same issue with opening intents on Firefox for Android (Firefox 115.2.1) tested on Android 12 (Pixel3a) and Android 8.1.0 (Nexus 6P).

App installed
preparesedev://test Opens app
intent://test#Intent;scheme=preparesedev;package=io.entidad.apps.esencial.accp.developerapp;end Opens app
intent://test#Intent;scheme=preparesedev;package=io.entidad.apps.esencial.accp.developerapp;S.browser_fallback_url=http%3A%2F%2Fstephanbruijnis.dev%2Fdocs;end Opens fallback

App not installed
preparesedev://test Nothing happens
intent://test#Intent;scheme=preparesedev;package=io.entidad.apps.esencial.accp.developerapp;end Opens Google Play store
intent://test#Intent;scheme=preparesedev;package=io.entidad.apps.esencial.accp.developerapp;S.browser_fallback_url=http%3A%2F%2Fstephanbruijnis.dev%2Fdocs;end Opens fallback

The issue is with the scenario where the app is installed but it still opens the fallback URL. Chromium (Chrome/Edge) opens the app with the intent if installed, which is the expected behaviour.

With kind regards,
Stephan

I just tested it again in Firefox 116.0 (Android) and noticed that my setting in Firefox was "Never" for Open Links Native Apps
However in the test cases I provided it still asks to open the native app if there is no S.brouwser_fallback_url with the config set to Never

Severity: -- → S3
Attachment #9386449 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: