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
4
votes
3 answers

Get ANR dialog when open links from WebView in Chrome custom tabs. How do I debug this?

I want to use Chrome custom tabs to properly handle URLs out of my domain. Here is the code webView.setWebViewClient(new WebViewClient() { public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request){ String url =…
Hoa Vu
  • 2,865
  • 4
  • 25
  • 33
4
votes
1 answer

How do I listen to URL changes in Chrome Custom Tabs

Im working on an android app, that requires Chrome Custom Tabs (It uses an API that requires this exact package). I want to know when ChromeTabs gets redirected to a specific URL, but i haven't found anything useful yet. Does anyone have experience…
Simon k
  • 403
  • 1
  • 5
  • 17
4
votes
2 answers

Chrome custom tabs - setCloseButtonIcon() not changing icon

I'm trying to change icon for close button in Chrome custom tabs. But it is not changing. Here's my code: CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder(); builder.setCloseButtonIcon(BitmapFactory.decodeResource(getResources(),…
RandomyzeEverything
  • 764
  • 3
  • 7
  • 21
4
votes
3 answers

Chrome CustomTab error: java.lang.NoSuchMethodError: No static method startActivity

I am trying to connect fitbit with my app using chrome custom tabs. But I am getting following error. java.lang.NoSuchMethodError: No static method startActivity(Landroid/app/Activity;Landroid/content/Intent;Landroid/os/Bundle;)V in class…
4
votes
1 answer

How to use the Intent from chooser as a PendingIntent

I want to use the CustomTabs library, where I need to add a share menu item. The library accepts only PendingIntent instance to be used as an Action for the menu item. I want to use the following code to make sure that the list is suggested to the…
X-HuMan
  • 1,488
  • 1
  • 17
  • 37
4
votes
0 answers

Chrome Custom Tabs and push notifications

When using an android app with chrome custom tabs, the push notifications can be registered there? And if so, they will apear in the chrome browser, outside the app? How does it behave? Chrome Custom…
4
votes
1 answer

Chrome custom tabs cookies, storage APIs and service worker

I tried to lookup many answers from stackoverflow but couldnt find anything specific to this, I am implementing payment app and I want to display custom-tab in my app to record user visit by storing user-id, either by setting a cookie or using…
4
votes
1 answer

How to add EXTRA_REFERRER to CustomTabsIntent builder in Chrome custom tab for Android

I am using newly launched Chrome Custom tabs for android instead of using webviews. This is the link to their documentation Here is the code that shows how to use it. String url = ¨https://paul.kinlan.me/¨; CustomTabsIntent.Builder builder = new…
Palak Darji
  • 1,084
  • 18
  • 28
4
votes
1 answer

Chrome Custom Tabs hide address bar

I am developing a widget that customers can integrate into their apps. Their users must authenticate themselves (via OAuth). Therefore, it's preferable that my customers use Chrome Custom Tabs so that the user is likely logged in with the OAuth…
Andrew Rasmussen
  • 14,912
  • 10
  • 45
  • 81
4
votes
0 answers

How do I close the app on chrome custom tab close

I want the app to close when the user closes the custom tab. I experimented with: public interface ConnectionCallback { /** * Called when the service is connected. */ void onCustomTabsConnected(); /** …
Angad Dubey
  • 5,067
  • 7
  • 30
  • 51
4
votes
1 answer

Getting ERR_UNKNOWN_URL_SCHEME when trying to use OAuth with a Chrome Custom Tab

I am building an Android app that utilizes the Digital Ocean API. To authenticate, the app opens a Chrome Custom Tab to the Digital Ocean OAuth page. I have my redirect URI set to myapp://authorize/ and have registered that in my Android Manifest…
russjr08
  • 881
  • 1
  • 8
  • 16
3
votes
0 answers

Chrome Custom tabs not working on emulator but are working on real Android device

I have an app that uses Chrome custom tabs for third party auth sign in. The problems is is that when the custom tab is asked to open the url, the tab closes as soon as it's opened on an emulator, and only stays visible for a "split second". On a…
Mr. Robot
  • 1,334
  • 6
  • 27
  • 79
3
votes
0 answers

How can a native Android App support multiple SSO providers and allow users to login with different accounts without requiring manual logout in Chrome

I am trying to implement an SSO login in a native Android app and want to follow the best practices outlined in RFC 8252 (OAuth 2.0 for Native Apps). This requires using Custom Tabs rather than WebViews: B.2. Android Implementation Details Apps…
3
votes
0 answers

how to force dark theme in custom chrome tab?

I'm working on an Android App which supports dark theme. I use Custom Chrome Tab to display web page. Just wondering if there is any way to force dark theme in custom chrome tab.
Howard S
  • 111
  • 5
3
votes
0 answers

TWA autocloses on firing chrome intent

What I want is to CustomTWAActivity to not close and keep on running. I have a MainActivity that starts a TWA (Trusted Web Activity based on CCT protocol). I have extended the TWA Launcher with a Custom Class so that I can override its onNewIntent…