mozilla-mobile / focus-android

⚠️ Firefox Focus (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
2.11k stars 710 forks source link

Focus doesn't automatically pass over a link to a relevant app or ask for it. #829

Closed moonmehta closed 2 years ago

moonmehta commented 7 years ago

So say I am using the DuckDuckGo search widget/Firefox Android search activity with DuckDuckGo as default search engine. And I use a !bang from the widget to visit a subreddit. Chrome/Brave automatically recognize that the link can be handled by an app an ask if I would like to open it there using the system picker. Focus directly opens the link instead, even if I want the app to handle it.

Basically, Focus opens this directly on executing the bang search:

screenshot_2017_06_29_11_43_13

And Chrome/Brave ask which options to open in:

screenshot_20170629-114139

Is it possible to achieve this? I know Focus has an "Open With" option but that's not the same thing as this implementation.

And if this is somehow beyond the scope of Focus, do explain. The reason I think its not is: Focus encourages users to set it as default so that links from apps can be opened in Focus as a Custom tab and activity not recoded for good. But setting it as default also means that it will handle search widget/apps queries (Google/DuckDuckGo/Bing/Firefox search activity) and so I think it is important to integrate it properly into the system.

TPS commented 7 years ago

Another example is GPlay links, which don't prompt for Play app.

pocmo commented 6 years ago

This was missing the UX label and I added "needs strings" because depending on what (or if) we do something about this we might need strings too (and then it needs to move).

My opinion: We do not jump to other apps directly because this would leak the browsing session to other apps ("User has visited site X"). It's possible to switch to native apps that open specific URLs via the "Open with.." menu item. Personally I do not think an action is required here. Fennec doesn't switch to other apps either. It shows an Android icon in the toolbar for that (However it doesn't have an "Open with..." option).

pocmo commented 6 years ago

@lime124 ---^

TPS commented 6 years ago

Many of these links need to go public for functionality — they're only useful if logged in — so rather than do so only in Klar/Focus which would "leak the browsing session" to site owner (which would sync w/ logged-in app) anyhow, why not implement an "Open with" pop-up menu, or force the system's own before loading the site (maybe as link menu option — "Open this link in…) to prevent loading content twice (to save time & data).

lime124 commented 6 years ago

thanks for flagging me @pocmo!

As people have pointed out, there are two groups of people with different end goals - those who want links to automatically open external apps and those people who don't want session information to leak out of Focus.

While the current status quo isn't awesome (open all links in Focus), we also can't assume that all links should open in external apps. As people have mentioned, there needs to be some UI/interaction added to achieve both goals. It's possible the Open with menu will be the right solution, I need to look into more.

This will not make it into Granite though. We have a work week this week and I have other priorities to finish for the release first.

zanona commented 4 years ago

Whenever trying to open a page that redirects to a deep-link i.e: link to Play Store. I am not asked to open with a specific app and only get 'Unknown protocol' error page with a retry button.

My workaround is to then open the page on standard Firefox and get redirected from there. In fact, I guess that's the only reason I still have standard Firefox installed. It would be great being prompted on what to do instead of just getting an error page.

lobontiumira commented 2 years ago

Hello all!

Focus has now the "Open links in apps" option in Settings - Advanced. When this option is enabled, Focus asks the user "Open in app? Your activity may no longer be private.". If the app is not installed, the user is redirected to the Play store to install it, if the app is installed, the user is redirected to the app.

I'll close this ticket.