Closed Bug 1337771 Opened 3 years ago Closed 3 years ago

Custom tabs: Action button not working for some apps

Categories

(Firefox for Android :: General, defect)

All
Android
defect
Not set

Tracking

()

VERIFIED FIXED
Firefox 54
Tracking Status
firefox54 --- fixed

People

(Reporter: sebastian, Assigned: walkingice)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Google+ adds a "Share" action button to custom tabs. Clicking it does not perform any action.
Same is true for Youtube. If a video has a link in the description then the custom tab will show a "Share" button but clicking it does not perform any action.
Assignee: nobody → walkingice0204
I cannot reproduce by Youtube App(ver 12.03.57). Everytime when I click link in description, it always opens a new normal tab in Fennec. (not by CustomTabIntent).

But I can reproduce by G+.

After inspection, invoke method `send` must give an additional intent as well. And set current URL ad data Uri to that intent. According to Android documentation[1], the method will copy information from additional-intent to original-intent if the information is missing.

I gonna to get current url to invoke `Intent.setData(Uri)`, is there any best practice to get the url?

[1] https://developer.android.com/reference/android/app/PendingIntent.html#send(android.content.Context,%20int,%20android.content.Intent)
(In reply to Julian Chu [:walkingice] from comment #2)
> I cannot reproduce by Youtube App(ver 12.03.57). Everytime when I click link
> in description, it always opens a new normal tab in Fennec. (not by
> CustomTabIntent).

Interesting. Maybe they are running some kind of A/B experiment.

(In reply to Julian Chu [:walkingice] from comment #2)
> I gonna to get current url to invoke `Intent.setData(Uri)`, is there any
> best practice to get the url?

Tabs.getInstance().getSelectedTab().getURL() should give you the URL of the currently displayed website.
Comment on attachment 8835902 [details]
Bug 1337771 - Let ActionButton works in some apps

https://reviewboard.mozilla.org/r/111456/#review112770
Attachment #8835902 - Flags: review?(s.kaspari) → review+
Keywords: checkin-needed
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/20d4be4ad46d
Let ActionButton works in some apps r=sebastian
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/20d4be4ad46d
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 54
Verified as fixed in build 55.0a1 (2017-05-17) with devices: HTC Desire 820 (Android 6.0.1) and Nexus 9 (Android 7.1.1).
Tested on Google+, News&Weather, Chromer.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.