chrome-custom-tabs

Chrome custom tab gets sometimes stuck at blank screen during login

╄→гoц情女王★ 提交于 2020-01-04 05:37:09
问题 We recently integrated AppAuth into our application to automate the OAuth2 authorization code flow. When user wants to login, he is first redirected to our auth server, where he proceeds with the login, and then gets redirected back to the application. We use chrome-custom-tabs to for opening the login page (AppAuth). The problem is that it sometimes gets stuck at a blank screen (chrome tab displays just blank page without the rendered site or redirect). This happens when the user already has

Why does Android Chrome update from 61.0.3163.98 to 72.0.3626.76 break OAuth login in Chrome Custom Tabs?

风流意气都作罢 提交于 2019-12-23 07:47:15
问题 Our production Android application uses Chrome Custom Tabs for OAuth login It was working fine yesterday when Chrome version was 61.0.3163.98 Following an overnight update of Chrome to 72.0.3626.76 the Login process gets stuck in the embedded browser and the user is presented with a blank white screen. If we uninstall the Chrome update the login starts to work again What has changed with Chrome and/or Chrome Custom Tabs that breaks our login process? If I switch my default browser to Firefox

Unable to start Chrome CustomTabsIntent in my Android app

断了今生、忘了曾经 提交于 2019-12-22 04:46:25
问题 I am trying to use Chrome Custom Tabs in my Android application. My MainActivity class extends AppCompatActivity . In onCreate , I invoke startCustomTabs . Below is the code for that: private void startCustomTab(){ CustomTabsIntent intent = new CustomTabsIntent.Builder().setToolbarColor(getResources().getColor(R.color.colorPrimary)).build(); intent.launchUrl(this, Uri.parse("http://github.com/black-dragon/SaavnExtractor")); } As soon as the app launches, it crashes with following the error:

com.android.support:customtabs: No virtual method launchUrl

跟風遠走 提交于 2019-12-21 10:17:24
问题 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 the above error. Why it happens? if something was changed, why not backwards-compatible? 回答1: Don't know if it helps you but in my case (I have Facebook SDK in my app with custom tabs enabled) this error happened when user (without installed Facebook app) tried to log in. Exception java.lang

How to hide url in Chrome custom tab android

∥☆過路亽.° 提交于 2019-12-19 05:03:45
问题 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(); intentBuilder.setToolbarColor(Color.BLACK); intentBuilder.setShowTitle(true); intentBuilder.build().launchUrl(getActivity(), uri); I need to hide url below the title in toolbar 回答1: If you control both the content and the application, you can use Trusted Web Activities to

How can I check whether Chrome supports Chrome custom tabs?

前提是你 提交于 2019-12-18 15:17:10
问题 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 supported I'd like to use my old code but use the CustomTabsIntent.Builder() when they are. The old code loads the content in a WebView contained in an Activity where I can still manage the ActionBar. I'd like to write a helper method that will

setCloseButtonIcon() method doesn't change default Close button

余生长醉 提交于 2019-12-18 14:58:10
问题 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.ic_launcher); intentBuilder.setCloseButtonIcon(closeIcon); But nothing happens. Why? (Nexus 7, Marshmallow) 回答1: Typically this is caused by using a bitmap that has the 'wrong' dimensions. The correct dimensions are documented here: https://developer.android.com/reference/android/support/customtabs

custom chrome tabs asks for multiple browser to choose

若如初见. 提交于 2019-12-18 02:42:41
问题 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 this. mCustomTabsServiceConnection = new CustomTabsServiceConnection() { @Override public void onCustomTabsServiceConnected( ComponentName componentName, CustomTabsClient customTabsClient) { mCustomTabsClient = customTabsClient; mCustomTabsClient.warmup(0L); mCustomTabsSession =

android : open chrome custom tab from fragment

浪尽此生 提交于 2019-12-17 18:29:33
问题 I have one Activity MainActivity . It contains a ViewPager hosting a fragment FragmentPlaceHolder . This fragment has a RecyclerView . Now, on a click of a particular view, say button, inside a RecyclerView item, I want to open a chrome custom tab in new Activity . Can anyone help me with this one ? I am expecting a step wise implemention of Chrome Custom tabs . Thanks. 回答1: So, I did it this way: First of all, add this following dependency in build.gradle(app) : compile 'com.android.support

Hide / Disable default menu in Chrome Custom Tab

a 夏天 提交于 2019-12-13 12:57:07
问题 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(); intentBuilder.setToolbarColor(color); intentBuilder.setShowTitle(true); CustomTabActivityHelper.openCustomTab( this, intentBuilder.build(), Uri.parse(url), new WebviewFallback()); I need to secure my URL or not like to show my URL to User, But there is a option Open