Focus-android: Add FDroid Fennec ID so that Fennec shows up in Open In...

Created on 23 Aug 2018  Â·  12Comments  Â·  Source: mozilla-mobile/focus-android

Steps to reproduce

Have Firefox Klar and Firefox Fennec both installed from FDroid.
Set Klar to be the default Browser

Expected behavior

In the menu bar I expect a "Open in Firefox Fennec"

Actual behavior

I only get a "Open in ..." menu listing. If I select that then I get an option to either download Firefox or to open using the system Browser (that comes installed with MIUI)

Extra Note:

The weird thing is that if I set Firefox Fennec to be the default browser then everything works - I get the expected menu item in Klar. But running Fennec as default sorta defeats the point of Klar

Device information

Xiaomi Note 5 with MIUI
Latest version from FDroid

QAApproved feature size S testing

Most helpful comment

@ekager let's go ahead and add the FDroid ID as long as it's a small fix. Thank you.

All 12 comments

@brampitoyo to confirm what the expected behaviour should be (intentional?)

@geokon-gh This is a bug.

If both Firefox and Firefox Focus are installed, then when you go into the in-app browser’s menu, a menu item called “Open in Firefox” should appear above “Open in…”

If only Firefox Focus is installed, then the in-app browser’s menu will contain the menu item “Open in…”

@brampitoyo I don't think this was ever the case before. If we want to add this as a menu item we can but I have some concerns. It should replace "Open in..." when the user has multiple installed? Doesn't that limit the user's choice?

If Fennec would be the default we show an "Open in Firefox" option currently, but if there are multiple third party browsers we show "Open in...".

@ekager Good point!

What if we set a policy like this:

  1. If there’s a default browser set, and it’s other than Focus, then show: “Open in [browserName]” above “Open in…”

  2. If Focus is set as a default browser, just show “Open in…”

    • I guess we can try and prioritise Firefox, then put it above “Open in…”, but is that playing favourites?

I have no idea what you're talking about @ekager . No one said anything about replacing any buttons
That's all fine @brampitoyo , but I think you guys have lost the point...

Whether it shows as "Open in Fennec" or in the "Open in ..." menu thing is .. bikesheding. The bug is that Fennec is both not showing up as its own button nor in the "Open in..." menu when Focus/Klar is set as default. There is no way to open the webpage in Fennec at all (but, in contrast, the Xiaomi browser does show up in the ... menu) Maybe I should submit an issue to Fennec?

To anyone else having this problem - The work around I've found is to hit "Share" then I can open it in Fennec through that menu (it's a bit weird)

@geokon-gh this is because Fennec downloaded from FDroid has a different ID than we check for. We look for "org.mozilla.fennec", and the FDroid ID is "org.mozilla.fennec_fdroid". We could possibly add this to our list of third party browsers.

CC @bbinto @vesta0 @Sdaswani

I would ask for 'Help Wanted' on this @ekager .

It's a 1 line change, I'm asking if we want to do it :)

Holy crap.. I dunno how the workflow is at Mozilla.. but it's kinda crazy that this is still open and a one line change has generated a month of discussion haha

@ekager
I wish I was an Android developer so I could just make the PR for this.. but looking at how other apps behave, whatever Klar is doing is kinda bizarre/non-standard. Like when you open an email address or a link in basically any other app it will pop up a system/native selection menu with the available choices. If you click a link it shows you the browsers... and since the browsers all register with the system as such, the list is automatically populated correctly. So you don't need to maintain a list of valid IDs or anything nuts like that. But maybe there is a good reason you guys are reinventing a slightly-more-square wheel here.... (to have a consistent look across platforms?)

@ekager going back to this question: https://github.com/mozilla-mobile/focus-android/issues/3202#issuecomment-420749384

I don’t want to create the expectation we will support every App Store so let’s wait for a contributor to post a fix. If this is broken for google play builds let me know.

@ekager let's go ahead and add the FDroid ID as long as it's a small fix. Thank you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brampitoyo picture brampitoyo  Â·  5Comments

zekooooo picture zekooooo  Â·  7Comments

abusedcharacter picture abusedcharacter  Â·  5Comments

jonalmeida picture jonalmeida  Â·  7Comments

st3fan picture st3fan  Â·  5Comments