chrome-custom-tabs

How to set fallback of Chrome Custom tab to WebView?

故事扮演 提交于 2019-12-13 07:26:51
问题 I want to set Webview as fallback of chrome custom tab. If user don't have chrome installed on their mobile I want Webview to open url in the app. public class Main3Activity extends AppCompatActivity { static final String SITE_URL = "http://secure.shopershop.in/amazon-mobile-accessories"; static final String SITE_URL1 = "http://secure.shopershop.in/flipkart-mobile-accessories"; CustomTabsIntent customTabsIntent; CustomTabsIntent.Builder intentBuilder; @Override protected void onCreate(Bundle

Chrome custom tabs not opening other apps

孤街醉人 提交于 2019-12-12 08:19:22
问题 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 case with Chrome custom tabs . If I use an custom scheme( myapp://deeplinkurl/ ) it works correctly. How can I allow to let apps override the http scheme? 来源: https://stackoverflow.com/questions/34859497/chrome-custom-tabs-not-opening-other-apps

Broadcast not received from Chrome Custom Tab menu item click

為{幸葍}努か 提交于 2019-12-11 14:44:18
问题 I am doing the following within a Fragment (condensed for convenience): intentBuilder = new CustomTabsIntent.Builder(); String label = "Test"; PendingIntent pendingIntent = createPendingIntent(ActionBroadcastReceiver.ACTION_TEST); intentBuilder.addMenuItem(label, pendingIntent); CustomTabActivityHelper.openCustomTab( getActivity(), intentBuilder.build(), mUri, null); private PendingIntent createPendingIntent(int actionSourceId) { Intent actionIntent = new Intent(getActivity()

Android chrome custom tab customizable

主宰稳场 提交于 2019-12-11 13:03:39
问题 in how far is the chrome custom tab customizable? We are programming a app which is loading a webview in a fragment with an own header (action bar) and footer. Is custom tab loading in full screen or is their any way to load a chrome custom tab with a margin or something like that? To change the action bar title or color is not enough for our plan. Also i want to know about a way to display css3 properly in android versions without chromium (above android version 4.4 as far as i know). Thank

How to implement OAuth single Sign In/Sign Out with Chrome Custom Tabs

亡梦爱人 提交于 2019-12-11 12:28:36
问题 I am attempting to implement OAuth single sign in/ sign out in my current Android application. I am using Chrome Custom Tabs implementation 'com.android.support:customtabs:28.0.0' Sign in works fine, Chrome Custom tabs store the users cookies and all sign in flow work is as expected. New Sign In: Clearing Chrome cookies Clearing App storage The Android app loads the Sign In URL with a Chrome Custom Tab The user has to enter user name and password Redirect URL with custom scheme "call backs"

Chrome custom tabs's close button feature override

房东的猫 提交于 2019-12-11 11:43:39
问题 Close button of "chrome custom tab" close the entire webview itself. However I want it to override its behaviour to work as hardware back button behaviour so that user can go back to previous page of web instead of closing webview. I read so many posts and blogs but i could not get find any solution. I have found the solution to change the close button icon. 回答1: In my case my application does nothing but open the Chrome Custom Tab, so I was able to do this: // This is called on boot, and

Custom Close Button for Chrome Custom Tab

懵懂的女人 提交于 2019-12-11 09:43:22
问题 Is it possible to override the behaviour of the default close button on custom chrome tabs in Android? For example instead of just closing the chrome tab, can we redirect to a new Activity, or launch a dialog? 回答1: I'm not sure if you can do that. You can try to start the CustomTabIntent for result and wait for it finish and start it from onActivityResult() based on the requestCode you have started it with. private void openUrlForResult(CustomTabsIntent customTabsIntent, String url, int

Lock orientation in TWA

吃可爱长大的小学妹 提交于 2019-12-11 06:49:48
问题 I followed this article to make a TWA from a PWA. Everything is fine and the app feels like the PWA, but what I can't achieve is to lock the orientation to landscape. The manifest of the PWA has this: "orientation": "landscape", "display" : "standalone" So if you add it to the homescreen from Google chorme it works as intended. I tried setting the android:screenOrientation="landscape" in the manifest file and like this starts the app on landscape but it doesn't lock it. Anyone has tried

Chrome CustomTabs CustomTabsCallback onPostMessage not called

拥有回忆 提交于 2019-12-11 06:29:16
问题 I'm trying to work with the Chrome CustomTabs on Android, but I have a problem about use of CustomTabsCallback. So, I searched on the web some examples or documentation to implement in my code, but I unfortunatelly I did not find anything... I need to receive a postMessage sent by the hosted web page and read the content inside it. The postMessage was sent using "*" as origin, but I don't think that's the real problem. Here my code: CustomTabsClient.bindCustomTabsService(context, CUSTOM_TAB

Launching Chrome custom tabs example without having launched Chrome beta for the first time

↘锁芯ラ 提交于 2019-12-11 04:08:32
问题 I have just begun experimenting with chrome custom tabs and faced this small problem. While I set up the environment to run the Chrome custom tabs example I downloaded Chrome beta on my device. However, when I ran the example, it wouldn't work. I put up a couple of breakpoints and everything seemed to be working and, most importantly, the program could find a package that supported custom tabs with: String packageName = CustomTabsHelper.getPackageNameToUse(this); 'packageName' was set to