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

346 questions
25
votes
3 answers

How to hide url in Chrome custom tab android

I have implemented new Chrome Custom Tab in android, I am using the following code to open Uri uri = Uri.parse("https://akash.plobal.com/ploicy"); CustomTabsIntent.Builder intentBuilder = new CustomTabsIntent.Builder(); …
Akash Doshi
  • 391
  • 1
  • 3
  • 8
25
votes
4 answers

Can I inject Javascript code into Chrome Custom Tabs

In my app, I am currently using a web view to display some content. Then, I use Javascript injection to quickly fill out the form for the user. The only issue is, Webviews are incredibly slow compared to Chrome Custom tabs. Is it possible to inject…
alex23434
  • 339
  • 5
  • 11
22
votes
0 answers

Chrome custom tabs not opening other apps

The Chrome custom tabs doesn't seem to launch other apps by deeplinking. For example a PayPal payment, when Chrome is launched with this URL. It will ask the user if the URL has to be opened with the PayPal app or with Chrome. But this is not the…
Ion Aalbers
  • 7,249
  • 3
  • 34
  • 49
21
votes
0 answers

Is it possible to programmatically call a Chrome Custom Tab, but as "incognito mode"?

In some case, a user might not want the chrome custom tab to show up in their browsing history. Is there any way the app could tell the Chrome Custom Tab to display the webpage in incognito mode, and avoid storing that URL in the user normal…
m-p-3
  • 311
  • 3
  • 5
18
votes
2 answers

WebView vs Chrome Custom Tab

I am building an app where in a Detail Activity I have to show a web page. I was going to use WebView, but then I saw Chrome Custom Tab. What do you guys think it's better to implement and why?
17
votes
2 answers

Listen chrome custom tab progress event

I have an application using Chrome custom tabs to open some links, I need to have event each second during all the time the user stay on Chrome, or know how many time he stay on Chrome. For me the only way to do it is to use a Service. Is it…
Dichoben
  • 193
  • 9
17
votes
5 answers

How to change a title color in Chrome Custom Tabs

Is there any way to change a title color in Chrome Custom Tabs? I applied Chrome custom tabs to show a web page. To do, I utilized CustomTabsIntent.Builder class. However, there is no interface to change a title color. String url =…
Daehee Han
  • 181
  • 1
  • 7
16
votes
0 answers

Google SignIn in app without adding it in device accounts

We’ve been using Google SignIn through WebView, but as Google will be deprecating this soon, are there any alternatives to do the same ? We have a slightly special use-case where our devices are being used in a warehouse and one device is being used…
16
votes
2 answers

setCloseButtonIcon() method doesn't change default Close button

I try to change default icon for Close Button in Chrome custom tabs (CustomTabsIntent.Builder) Simple code for testing: Bitmap closeIcon = BitmapFactory.decodeResource(getResources(),…
tehnolog
  • 1,154
  • 1
  • 9
  • 21
15
votes
1 answer

Disable cookies and clear cache in Chrome Custom Tabs

I am using Chrome Custom Tabs to redirect users to a link of an 3rd party site. But, I want the cookies to be disabled and cache cleared in the resultant chrome custom tab (just like if the link would have opened in the incognito mode of google…
Maverick7
  • 757
  • 6
  • 19
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
7 answers

Chrome Custom Tabs change the default close button not working

I am trying to change the default close button on the actionbar of the custom chrome tabs. I have tried to set using setCloseButtonIcon() However, the default close button still shows. I want to change the close to an arrow. My code below: public…
ant2009
  • 30,351
  • 141
  • 365
  • 559
15
votes
1 answer

"Navigation is blocked" when redirecting from Chrome Custom Tab to Android app

I'm 'modernizing' our login widget to use Chrome Custom Tabs as Google will start blocking OAuth requests using Webviews in a few months. The login widget works with our Identity Service, which supports classic 'username&password' login and Social…
Free Willaert
  • 929
  • 1
  • 10
  • 23
15
votes
4 answers

Chrome Custom Tabs redirect to Android app will close the app

I am trying to implement an OAuth2 flow with an Android Chrome Custom Tab but my app is always closed (no crash) when the Chrome Custom Tab is receiving the 302 with the location/scheme of my app. If I create a HTML page with ahref link and touch…
sysbeast
  • 225
  • 1
  • 2
  • 8
15
votes
2 answers

How do you add custom HTTP headers to Chrome Custom Tabs?

With standard Android WebViews, you use WebView.loadUrl(String url, Map additionalHttpHeaders). How do you add your additional headers with Chrome Custom Tabs?
Matt Quigley
  • 6,792
  • 3
  • 22
  • 26
1
2 3
23 24