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.
chrome-custom-tabs
401
questions
42
votes
0
answers
2k
views
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 ...
30
votes
4
answers
8k
views
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 ...
27
votes
3
answers
17k
views
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 ...
25
votes
1
answer
3k
views
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 ...
23
votes
0
answers
2k
views
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 ...
21
votes
1
answer
13k
views
"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 ...
20
votes
2
answers
29k
views
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?
19
votes
4
answers
21k
views
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.
...
19
votes
4
answers
10k
views
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 ...
19
votes
2
answers
18k
views
Is it possible to hide URL bar on Chrome Custom Tabs
I'm looking for a way to, as the title says hide the url bar.
I've got this so far but it hasn't changed anything.
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
builder....
18
votes
1
answer
3k
views
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 ...
17
votes
2
answers
11k
views
How do you add custom HTTP headers to Chrome Custom Tabs?
With standard Android WebViews, you use WebView.loadUrl(String url, Map<String, String> additionalHttpHeaders). How do you add your additional headers with Chrome Custom Tabs?
17
votes
2
answers
2k
views
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 ...
16
votes
7
answers
8k
views
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 ...
16
votes
2
answers
2k
views
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(), R.mipmap....
15
votes
4
answers
12k
views
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 ...
15
votes
1
answer
4k
views
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 ...
15
votes
2
answers
5k
views
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?
15
votes
1
answer
593
views
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"));
...
15
votes
5
answers
13k
views
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 ...
14
votes
3
answers
18k
views
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 ...
14
votes
6
answers
9k
views
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 ...
14
votes
3
answers
4k
views
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 ...
14
votes
2
answers
16k
views
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
5
answers
23k
views
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 ...
13
votes
1
answer
5k
views
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 ...
13
votes
1
answer
2k
views
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 = ...
12
votes
1
answer
10k
views
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 ...
12
votes
2
answers
6k
views
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 ...
12
votes
3
answers
6k
views
Opening Tag URI with Chrome Custom Tabs "ActivityNotFoundException: No Activity found to handle Intent"
I am currently developing a simple RSS app for Android and one of the app's features is opening url with chrome custom tabs; I have implemented Chrome Custom Tabs based on the samples available on the ...
12
votes
3
answers
7k
views
Redirect in Chrome Custom tab is not captured for deep link
I'd like to capture a redirect that occurs in a Chrome Custom tab to ensure the user stays in a native mobile application.
Here's how the Chrome Custom Tab is launched:
val url = "https://demo....
12
votes
2
answers
3k
views
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 ...
12
votes
3
answers
4k
views
Is there a way to test Chrome Custom Tabs with Espresso?
Here is the stub of the code.
Click data item on ListView . Works as designed and opens Chrome Custom Tab :
onData(anything()).inAdapterView(withId(R.id.listView))
...
11
votes
3
answers
5k
views
Chrome custom tabs and intent-filter
The application has Activity to show the content of the specific website e.g. "example.com". So to show the content of "example.com/product/123" inside the app I have intent filter:
<activity
...
11
votes
2
answers
8k
views
How to implement URL change listener in chrome custom tabs?
Is there any listener in which we can know that URL has been changed in chrome custom tabs.
String url = ¨https://paul.kinlan.me/¨;
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
...
11
votes
1
answer
3k
views
Lock orientation for custom tabs
I would like to lock the orientation using Chrome Custom Tabs. Is this something I can do with the Low Level API or do I need to get a new method added for this functionality?
My use case is that I ...
11
votes
2
answers
7k
views
How to OAuth 2.0 login using Chrome custom tabs (Fitbit API)
Fitbit API doesn't support webview anymore.
So, I studied chrome custom tabs and applied in my app.
But after login, when I pressed this pink button(allow button), nothing happened.(Image below)
...
11
votes
1
answer
2k
views
how to use an intent-filter on customtabs using https scheme?
My app opens up a customtabs browser, and when the browser encounters a certain url I want to pop back open my app.
I found this posting that works - Android - create a schema for my app that will ...
11
votes
1
answer
5k
views
CustomTabs shows ERR_UNKNOWN_URL_SCHEME after 302 Redirect
I'm trying to implement OAuth2 login flow using Custom Tabs, but after login has been successful a 302 Redirect is retrieved with url as the following: "my.app:/oauth2/code?xxx".
Now I have declared ...
11
votes
1
answer
3k
views
Firebase Dynamic Links not deep linking with short URL on Custom tabs
I've created some Firebase Dynamic Links in my application programmatically that are working fine when they are long ULRs, I mean, the default Dynamic Link that Firebase creates. If the user does not ...
10
votes
2
answers
10k
views
Auto close chrome custom tab
I had an app that used to open the phone browser, where the user would be redirected to my webapp, where after a certain user action, the webapp redirects back to the app using intent filters
<...
10
votes
2
answers
5k
views
How to get Callbacks from Chrome Tabs in android like web View provides shouldOverrideUrlLoading, onLoadResource, onPageFinished
I am trying to replace the web view with Chrome Custom tabs in my project. For replacing webview, I need a callback in the Chrome tab like the android web view provides. So are there any callbacks ...
10
votes
2
answers
3k
views
Is it possible to add custom request headers when using chrome custom tabs?
Planning to use chrome custom tabs, however before I start I wanted to know if its possible to intercept the request and set any headers in the request similar to WebViews ?
Read through the ...
10
votes
1
answer
5k
views
Post data with Chrome Custom Tabs
Is there a way to send post data with url with Custom Chrome Tabs? Like it was with WebView:
webView.postUrl(String url, byte[] postData)
Cannot find any about it in documentation or in examples
9
votes
1
answer
3k
views
com.android.support:customtabs: No virtual method launchUrl
java.lang.NoSuchMethodError: No virtual method launchUrl(Landroid/app/Activity;Landroid/net/Uri;)V in class Landroid/support/customtabs/CustomTabsIntent
Before everything worked, but today I can see ...
9
votes
1
answer
3k
views
Chrome Custom Tabs CookieManager
I have a an app that uses cookies to give an authcode to inturn get a token for OAuth flow. I looked on the Android developer site and it says that CookieManager is used with WebView instances. Does ...
9
votes
2
answers
5k
views
Android Chrome custom tabs / Fitbit web API won't redirect if app is already authorized. (OAuth2.0)
I intend on creating a third party fitbit app for alarm synchronizing.
However, I have encountered some difficulties regarding the registration of my app, more explicitly on getting the access token ...
9
votes
1
answer
3k
views
Is there alternative way to JavascriptInterface of Webview on Chrome Custom Tabs?
I am using JavascriptInterface of Webview.
Is it possible on Chrome Custom Tabs?
Or
Is there alternative method of that?
9
votes
2
answers
6k
views
Disable chrome custom tabs? [closed]
I recently got an update from chrome beta and it came with chrome custom tabs.
I do not like this feature and would like to just open the links directly without pressing the open in chrome button.
...
8
votes
3
answers
3k
views
facebook login button click fails when facebook app isn't installed
My facebook login button works alright when the facebook app is installed.
When the facebook app isn't installed on the device, it crashes my app:
E/AndroidRuntime: FATAL EXCEPTION: main ...