Questions tagged [chrome-custom-tabs]

Chrome Custom Tabs provides a way for an application to customize and interact with a Chrome Activity on Android, to make it a part of the application experience, while retaining the full functionality and performance of a complete web browser.

Documentation: https://developers.google.com/web/android/custom-tabs

GitHub Demos: https://github.com/GoogleChrome/android-browser-helper/tree/master/demos

396 questions
15
votes
1 answer

Android browser cuts the https:// scheme from complete qualifier

In my app, I show an external HTML site in either a CustomTabsIntent or a in a WebView: if (customTabsIntent != null) customTabsIntent.launchUrl(this, Uri.parse("http://some.where.com/site.html")); else startActivity(new Intent(Intent.ACTION_VIEW,…
15
votes
4 answers

custom chrome tabs asks for multiple browser to choose

I am trying to implement custom chrome tabs. I am using Google's default library customtabs. I referred this tutorial for implementing custom chrome tabs. now as suggested in tutorial, I did my coding something like…
V-rund Puro-hit
  • 5,518
  • 9
  • 31
  • 50
15
votes
2 answers

I want to load a local html file through chrome custom tab, is that workable?

Currently I put my html file in assets, and I load it in WebView. Can I load it through chrome custom tab?
Wang Tavx
  • 183
  • 1
  • 9
15
votes
5 answers

Hide / Disable default menu in Chrome Custom Tab

I have implemented new Chrome Custom Tab in android, I am using the following code to open String url = "http://www.flipkart.com/"; int color = Color.BLUE; CustomTabsIntent.Builder intentBuilder = new CustomTabsIntent.Builder(); …
appukrb
  • 1,507
  • 4
  • 24
  • 53
14
votes
1 answer

Android - "setToolbarColor(int)" and "setSecondaryToolbarColor(int)" is deprecated

I use this code to open links with Chrome Custom Tabs. But it's showing @Deprecated for setToolbarColor() and setSecondaryToolbarColor(). I haven't found anything for replacement. Note: Android studio suggests "Use setDefaultColorSchemeParams…
user14817809
14
votes
3 answers

Callback on dismiss of chrome custom tabs

I have an activity 'A' and inside that activity, I have opened a chrome custom tab. Now when the user closes the chrome custom tab I want to open another activity 'B'. Is there a way to know when the chrome custom tabs has been closed. Or any other…
rahulk9
  • 795
  • 3
  • 10
  • 20
14
votes
2 answers

Enabling Chrome Custom Tabs for Facebook login using Android SDK

I am using Facebook SDK version 4.11.0 in my app. As per the steps outlined on the Official docs page, I have added following things inside manifest file to enable Chrome Custom Tabs.
13
votes
3 answers

How to send data from my TWA webapp to my app?

With Crosswalk I had a very convenient javascript-to-app interface so I could call a java function from javascript and share data from my webapp to my android app. How can I achieve this with Custom Tabs (or Trusted Web Activity) ? There seems to be…
13
votes
1 answer

Is it possible to have Chrome custom tabs as View object

Currently, this is how I implement Chrome custom tabs String url = "http://www.google.com/"; CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder(); CustomTabsIntent customTabsIntent =…
Cheok Yan Cheng
  • 47,586
  • 132
  • 466
  • 875
13
votes
4 answers

How to close chrome custom tabs

In my app I have opened a url via Chrome Custom Tab. We know that when user taps the device back button or custom back button Chrome Custom Tab will be closed. Is it possible to close the Chrome Custom Tab by programatically without user…
Zakir
  • 1,305
  • 1
  • 10
  • 13
13
votes
6 answers

How can I check whether Chrome supports Chrome custom tabs?

I have an activity that loads an external url into a webview within my app. I'd like to use Chrome Custom tabs when it's available but I support devices that might not have a version of Chrome that supports them. In the case of CustomTabs not being…
Jeff
  • 2,198
  • 3
  • 21
  • 38
12
votes
1 answer

Android app links not working with Chrome Custom Tabs

I have application which use app links for login in the browser outside of the app and is redirected back after login is completed. This works fine with android native browsers but fails when I'm using Chrome Custom Tabs. User is logged in custom…
user1552050
  • 121
  • 1
  • 5
12
votes
2 answers

How to access elements on external website using Espresso

Using espresso, we click a Login button which launches an external website (Chrome Custom Tab) where you can login and then it redirects back to our android application. Is there a way in Espresso to: 1) Verify the correct URL is being launched 2)…
12
votes
1 answer

How to get Url change from CustomTabsClient

How to get the url when the page changes, using CustomTabsClient? For example WebView has a method: @Override public void onPageStarted(WebView view, String url, Bitmap favicon){} I need a similar method for CustomTabs. I have found this one:…
Mikelis Kaneps
  • 4,576
  • 2
  • 34
  • 48
12
votes
2 answers

Memory leak detected in Chrome Custom Tabs

I'm attempting to implement Chrome Custom Tabs and detecting a memory leak through LeakCanary. The demo application does not appear to leak unless we add another Activity layer (i.e. MainActivity launches Activity2, which binds/unbinds to the custom…
Allison
  • 501
  • 4
  • 15
1
2
3
26 27