focus-android
focus-android copied to clipboard
[custom tab] Share icon is missing on Android 5 device
Steps to reproduce
- Make Focus your default browser.
- From Gmail open a link on a custom tab.
- Observe if the share icon is displayed.
Expected behavior
The share icon is displayed in the toolbar.
Actual behavior
The share icon is not displayed in the toolbar.
Device information
- Android device: Huawei MediaPad M2 (Android 5.1.1)
- Focus version: Beta 102.0.0-beta.2, RC 101.1.1., latest Nightly from 06/05.
Note that the share icon is displayed on phone devices.

@delia-pop noticed that this bug is not Focus specific, it can be reproduced also on Fenix. We need to do some extra research to see how it behaves on different devices with different android versions
Share item is set by default to be hidden and its visibility is changed based on what we are receiving for EXTRA_SHARE_STATE from CustomTabsIntent
If EXTRA_SHARE_STATE value is different of SHARE_STATE_ON the share button is not displayed.
CustomTabsIntent is part of androidx.browser.customtabs and androidx contains OS libraries, so this behavior seems more likely to be expected
I will let this open to suggestions
Based on the above comment it seems like we'd want the same behavior as on other browsers. @delia-pop Can you test if Focus / Fenix has the same behavior for showing the share button as Chrome?
Hello, @Mugurell @ionutbedregeanu, I re-tested this behavior on latest Focus/Fenix Nightly 104 and Chrome with Huawei MediaPad M2 (Android 5.1.1) tablet and Google Pixel 6 (Android 12) phone for reference and observed the following:
- the Share Icon is displayed in toolbar in custom tabs on Phone in Fenix/Focus;
- the Share Icon is not displayed in toolbar in custom tabs on Tablet in Fenix/Focus;
- the Share Icon is displayed in toolbar in custom tabs on Phone and Tablet in Chrome;

Thank you Delia!
So it remains for us to investigate what configuration is sent to us with EXTRA_SHARE_STATE and then if the app uses that as expected or not.
Moved to bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1802641
Change performed by the Move to Bugzilla add-on.