Closed Bug 1225980 Opened 9 years ago Closed 8 years ago

Implement CustomTabsService

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(firefox52 fixed)

RESOLVED FIXED
Firefox 52
Tracking Status
firefox52 --- fixed

People

(Reporter: unroar, Assigned: droeh)

References

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36 Steps to reproduce: Click on a button in an Android app. Actual results: Web page opened in Chrome with Chrome Custom Tabs. Expected results: Opened in my default browser Firefox for Android. The CustomTabsService is a feature for Android apps to show a web in the browser styled to look like the app. Some Google links describing the feature: https://plus.google.com/+AndroidDevelopers/posts/BZqXds6fdxU?linkId=18858192 https://developer.android.com/reference/android/support/customtabs/CustomTabsService.html http://android-developers.blogspot.com/2015/09/chrome-custom-tabs-smooth-transition.html https://developer.chrome.com/multidevice/android/customtabs
Status: UNCONFIRMED → NEW
Ever confirmed: true
I think warmup() is pretty much the only thing we'll end up implementing at least in the short-term. We could think about setting up a speculative connection in mayLaunchUrl().
Comment on attachment 8762776 [details] [diff] [review] Implement CustomTabsService.warmup() Review of attachment 8762776 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/base/java/org/mozilla/gecko/customtabs/GeckoCustomTabsService.java @@ +27,5 @@ > private static final String LOGTAG = "GeckoCustomTabsService"; > > @Override > protected boolean warmup(long flags) { > + Log.v(LOGTAG, "warming up..."); if (DEBUG) ... @@ +45,5 @@ > + GeckoThread.init(GeckoProfile.initFromArgs(GeckoCustomTabsService.this, null), null, null, false); > + GeckoThread.launch(); > + Log.v(LOGTAG, "warmed up (launched)"); > + } > + }); We should use GeckoService for this instead of doing init here.
Attachment #8762776 - Flags: review?(nchen)
Assignee: nobody → droeh
Basically the same idea as snorp's patch, but moves the implementation to a static method (startGecko) in GeckoService. Randall, snorp recommended you as a reviewer for this since Jim's on PTO right now.
Attachment #8809070 - Flags: review?(rbarker)
Attachment #8809070 - Flags: review?(rbarker) → review+
Pushed by droeh@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/aff695846bfd Add a startGecko static method to GeckoService, to be used for GeckoCustomTabsService.warmup() r=rbarker
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 52
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: