Closed
Bug 1208655
(customtabs)
Opened 9 years ago
Closed 4 years ago
[meta] Make Fennec be an Android "custom tab" ecosystem participant
Categories
(Firefox for Android Graveyard :: General, defect)
Firefox for Android Graveyard
General
Tracking
(firefox44 affected)
RESOLVED
INCOMPLETE
Tracking | Status | |
---|---|---|
firefox44 | --- | affected |
People
(Reporter: nalexander, Unassigned)
References
Details
(Keywords: meta)
The Chrome team is pushing a series of APIs to allow Android Apps to
launch a mildly-customized web browser rather than embed a WebView.
The features are sketched at
http://blog.chromium.org/2015/09/chrome-custom-tabs-smooth-transition_2.html;
and https://developer.chrome.com/multidevice/android/customtabs is a
good reference.
There are two broad parts: UI customizations and performance improvements.
The UI customizations add additional ACTION_VIEW parameters to configure
the browser:
* Custom colors for the toolbar
* Custom top-level action button
* Reduced menu with custom menu items
The performance improvements come from defining a Service that third
party Apps can bind to expose pre-fetching and cache warming. This
service is exposed with a small Android AIDL. The interface is
bi-directional; there's a provision to have the browser notify the
consuming App of page lifecycle events.
Supporting some or all of this series of features is a lot of work;
Fennec will need significant re-architecting to achieve the UI
customizations, and significant platform improvements to achieve the
backend customizations. This ticket tracks that work.
Reporter | ||
Comment 1•9 years ago
|
||
A first cut at the UI customization looks like a little like Fennec's current WebApps implementation: a separate BrowserApp-based Activity, running in a separate process from Fennec proper. That process will have its own Gecko and hence its own Gecko profile.
Fennec proper would inspect incoming load URI Intents for the custom ACTION_VIEW parameters and route them to the new Activity as appropriate.
Over time, we will try to allow multiple Activities to connect to different XUL windows in the same Gecko instance; as that happens, we can move the new Activity back into the main Fennec process.
Comment 4•9 years ago
|
||
It sounds like this will be a lot of work - in the meantime, could we add a custom tab provider that just opens up a tab in Firefox?
Comment 5•9 years ago
|
||
(In reply to Chris Lord [:cwiiis] from comment #4)
> It sounds like this will be a lot of work - in the meantime, could we add a
> custom tab provider that just opens up a tab in Firefox?
Yeah, this might be possible. However as long as it is the (third party) app developer's responsibility to pick the browser (or add custom code to let the user choose) it's unlikely that Firefox will receive any Intents from third party apps.
* Hardcoded package for chrome service: https://developer.chrome.com/multidevice/android/customtabs#implementationguide
* Also see "Preparing for other browsers": https://developer.chrome.com/multidevice/android/customtabs#bestpractices
Comment 6•9 years ago
|
||
After some hacking the situation seems to be much better than I thought:
At least the Google apps I tested (Google+, Google search) use helper code like this:
https://github.com/GoogleChrome/custom-tabs-client/blob/30e16577e696b635bfc5f66aafadc8a8033b8082/shared/src/main/java/org/chromium/customtabsclient/shared/CustomTabsHelper.java#L53-L107
This code will prefer the default browser over chrome if the default browser has support for custom tabs (= a service with the custom apps action exists in the package).
Comment 7•9 years ago
|
||
(In reply to Sebastian Kaspari (:sebastian) from comment #6)
> After some hacking the situation seems to be much better than I thought:
>
> At least the Google apps I tested (Google+, Google search) use helper code
> like this:
> https://github.com/GoogleChrome/custom-tabs-client/blob/
> 30e16577e696b635bfc5f66aafadc8a8033b8082/shared/src/main/java/org/chromium/
> customtabsclient/shared/CustomTabsHelper.java#L53-L107
> This code will prefer the default browser over chrome if the default browser
> has support for custom tabs (= a service with the custom apps action exists
> in the package).
We can also work with the Google team to update this code. They really want to support multiple browsers, so they can help evangelize whatever patterns we think will help that.
Comment 8•9 years ago
|
||
(In reply to :Margaret Leibovic from comment #7)
> (In reply to Sebastian Kaspari (:sebastian) from comment #6)
> > After some hacking the situation seems to be much better than I thought:
> >
> > At least the Google apps I tested (Google+, Google search) use helper code
> > like this:
> > https://github.com/GoogleChrome/custom-tabs-client/blob/
> > 30e16577e696b635bfc5f66aafadc8a8033b8082/shared/src/main/java/org/chromium/
> > customtabsclient/shared/CustomTabsHelper.java#L53-L107
> > This code will prefer the default browser over chrome if the default browser
> > has support for custom tabs (= a service with the custom apps action exists
> > in the package).
>
> We can also work with the Google team to update this code. They really want
> to support multiple browsers, so they can help evangelize whatever patterns
> we think will help that.
The best practices (https://developer.chrome.com/multidevice/android/customtabs#bestpractices) on the official docs already recommend developers to prepare for other browsers. I've fil a bug on Chromium so we can track the best practices for multiple browsers implementation on the samples: https://bugs.chromium.org/p/chromium/issues/detail?id=612478. Please feel free to chime on the thread and help on the discussion on how to make it better.
Comment 9•9 years ago
|
||
I've a prototype implementation of this locally and I see a bunch of errors when switching between the browser and a custom tab ("white page of death"). I'm going to clean this up, attach the patches and hand this off to the platform team.
Updated•9 years ago
|
Assignee: nobody → s.kaspari
Comment 10•8 years ago
|
||
Assignee: s.kaspari → nobody
Depends on: 1279278
Updated•8 years ago
|
Whiteboard: [platform-rel-Google][platform-rel-Chrome]
Updated•8 years ago
|
platform-rel: --- → ?
Updated•8 years ago
|
Alias: customtab → customtabs
Updated•8 years ago
|
platform-rel: ? → ---
Updated•8 years ago
|
Whiteboard: [platform-rel-Google][platform-rel-Chrome]
Depends on: 1369117
Blocks: 1347611
Depends on: 1386712
Depends on: 1388724
Depends on: 1365868
Depends on: 1393504
Depends on: 1365695
Depends on: 1395570
Depends on: 1395557
Depends on: 1356545
Depends on: 1367077
Depends on: 1367079
Depends on: 1394404
No longer depends on: 1365868
Depends on: 1365868
Depends on: 1395573
Comment 12•4 years ago
|
||
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
Assignee | ||
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•