chrome-custom-tabs

Chrome custom tabs cookies, storage APIs and service worker

人走茶凉 提交于 2019-12-11 03:06:25
问题 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 localstorage or by installing a service worker for the domain that custom tabs opens. Can a https page loaded in custom-tab write cookies that are also available when visiting the same page from Chrome? Is localstorage API available for my domain in

How to access elements on external website using Espresso

徘徊边缘 提交于 2019-12-09 10:18:40
问题 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 to: 1) Verify the correct URL is being launched 2) Access the elements on the website so that I can enter the login information and continue to login When I try viewing it in the Espresso Launch Navigator, nothing shows up for the page, and if I try to record, it doesn't pick up on me entering

WebView vs Chrome Custom Tab

泄露秘密 提交于 2019-12-08 15:04:35
问题 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? 回答1: If you just want to show a certain page then I would suggest you use chrome custom tabs. You can style the toolbar in a way it resembles your app style and they are intended for showing content without you having to worry much about anything else. if you want to have full control over what the

Is it possible to get the current URL of a Android Chrome CustomTab in real time?

一个人想着一个人 提交于 2019-12-08 07:44:20
问题 I am using Chrome customTabs in android and I need to get the current URL in real time, which means once it changed, trigger a callback. I found two things that may be useful. CustomTabsCallback.onNavigationEvent(int navigationEvent, Bundle extras); It can return a navigation event code when URL changed or refreshed. How to get Url change from CustomTabsClient BroadcastReceiver + PendingIntent can get url by clicking. https://gist.github.com/YeWang0/d344618bf8ac269dc3c39fa45214cf8b#handle

Is it possible to get the current URL of a Android Chrome CustomTab in real time?

╄→尐↘猪︶ㄣ 提交于 2019-12-08 04:38:29
I am using Chrome customTabs in android and I need to get the current URL in real time, which means once it changed, trigger a callback. I found two things that may be useful. CustomTabsCallback.onNavigationEvent(int navigationEvent, Bundle extras); It can return a navigation event code when URL changed or refreshed. How to get Url change from CustomTabsClient BroadcastReceiver + PendingIntent can get url by clicking. https://gist.github.com/YeWang0/d344618bf8ac269dc3c39fa45214cf8b#handle-actions-using-a-broadcastreceiver I am thinking, is it possible to fake a click event when

Chrome Custom Tabs throwing an error when chrome is not installed : No Activity found to handle Intent

被刻印的时光 ゝ 提交于 2019-12-07 23:27:35
问题 Chrome custom tabs working fine when chrome is installed but when chrome is not installed it is throwing an error CustomTabsIntent.Builder intentBuilder = new CustomTabsIntent.Builder(); intentBuilder.setShowTitle(true); CustomTabActivityHelper.openCustomTab(activityy, intentBuilder.build(), Uri.parse(link), new WebviewFallback()); LogCat Error Info FATAL EXCEPTION: main Process: opensource.itspr.recycler, PID: 13114 android.content.ActivityNotFoundException: No Activity found to handle

Check which url is opened in custom chrome tabs

久未见 提交于 2019-12-06 04:38:55
问题 Is there any function in chrome custom tabs analogous to onPageStarted of Webview. IN onNavigation.. the bundle is always null 回答1: By design this is not possible with Chrome Custom Tabs. You can tell that a user has navigated but you can't tell where they've gone to. See: http://developer.android.com/reference/android/support/customtabs/CustomTabsCallback.html for details of what's possible. 来源: https://stackoverflow.com/questions/35160635/check-which-url-is-opened-in-custom-chrome-tabs

Chrome custom tabs and intent-filter

做~自己de王妃 提交于 2019-12-05 17:01:24
问题 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 android:name=".LinkInterceptorActivity"> <intent-filter android:priority="999"> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:host="www.example.com" android

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

落花浮王杯 提交于 2019-12-05 14:54:56
问题 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 Login, by playing the OAuth2 'Client' in an Authorization Code Flow with Google/Facebook/... So the authorization code from Google is delivered to this Identity Service, which in turn provides our login widget with an access token. The access token

How to OAuth 2.0 login using Chrome custom tabs (Fitbit API)

不问归期 提交于 2019-12-04 08:31:14
问题 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) How can I receive access token and store it in app? Please help me. Thanks. 回答1: When authorizing agains the Fitbit API, you need to provide a redirect_uri , which is where the user will be taken after logging in. You need to provide a uri that will take the user back to your application. To achieve