mozilla-mobile / fenix

⚠️ Fenix (Firefox for Android) moved to a new repository. It is now developed and maintained as part of: https://github.com/mozilla-mobile/firefox-android
https://github.com/mozilla-mobile/firefox-android
Mozilla Public License 2.0
6.47k stars 1.27k forks source link

[Bug] The Spotify app is always opened when accessing any playlist from Fenix #4405

Closed abodea closed 4 years ago

abodea commented 5 years ago

Steps to reproduce

  1. Launch Fenix.
  2. Access www.spotify.com.
  3. Login with valid credentials.
  4. Access any playlist from spotify.

    Expected behavior

    The playlist is correctly opened in fenix browser.

    Actual behavior

    Spotify app is opened every time when accessing a playlist on Fenix.

    Device information

┆Issue is synchronized with this Jira Task

mcarare commented 5 years ago

@abodea IMO this is not a bug. This is a feature introduced in Android 6 which lets app open specific URLs without the open dialog. Spotify is default handler of links in spotify.com, open.spotify.com, accounts.spotify.com. Chrome and any other browser will have the same behaviour. This can be disabled only in device's system settings (see App Links). I think this issue can be closed.

abodea commented 5 years ago

Hi @mcarare I added this bug based on this issue https://github.com/mozilla-mobile/android-components/issues/3695. It will be a feature for many websites that can be opened in external apps using the button from QAB.

mcarare commented 5 years ago

IMO These are different issues and use cases. The feature you referenced is about opening a page in an app, via QAB, not handling a web link click, like in the issue you described here.

Mugurell commented 5 years ago

Clicking on a Spotify playlist, let's say https://open.spotify.com/playlist/37i9dQZF1DXdPIbPNr916x will result in a few redirects

the latter for which we would get an AppLinkRedirect like

AppLinkRedirect(appIntent=Intent { act=android.intent.action.VIEW cat=[android.intent.category.BROWSABLE] dat=spotify://user/spotify/playlist/37i9dQZF1DX3PFzdbtx1Us?adjust_reftag=csHngdU62eod1 pkg=com.spotify.music (has extras) }, webUrl=http://open.spotify.com/user/spotify/playlist/37i9dQZF1DX3PFzdbtx1Us?nd=1, isFallback=true)

which we'll then open in an external app.

Being that the Spotify website specifically sends us a deeplink to open the Spotify app I'd say the situation described here is not a bug but the intended behavior, and also the same behavior seen in other browsers for the same STRs.

boek commented 4 years ago

This should be resolved with #3177