chrome-custom-tabs

Chrome Custom Tabs CookieManager

六月ゝ 毕业季﹏ 提交于 2019-12-04 03:04:02
问题 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 that mean Chrome Custom Tabs can not use the CookieManager? Thank you in advance. James 回答1: Thats right, Chrome Custom Tabs uses Chrome's cookie store, and currently it's not possible to read or write cookies from the client application. 来源: https://stackoverflow.com/questions/36728869/chrome

Chrome custom tabs and intent-filter

六月ゝ 毕业季﹏ 提交于 2019-12-04 02:11:34
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:scheme="http" /> </intent-filter> </activity> But in some cases I have to show this content in browser, so I

Lock orientation for custom tabs

这一生的挚爱 提交于 2019-12-04 01:20:44
问题 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 have an app that has custom tabs and I want it to always show the custom tab in portrait, never landscape. 回答1: Custom Tabs does not currently provide an API that allows the developer to lock the orientation. As a best practice, developers should always think twice before forcing a specific

Chrome custom tabs not opening other apps

倖福魔咒の 提交于 2019-12-04 00:53:32
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

Google SignIn in app without adding it in device accounts

蓝咒 提交于 2019-12-03 16:50:16
问题 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 being used in a warehouse and one device is being used by multiple users. We do not want all the users to add their accounts to every device. It seems like a fairly reasonable use-case but I can’t seem to find a official documentation for cases like this. Is there any work around to this? Update: Here

How to access elements on external website using Espresso

坚强是说给别人听的谎言 提交于 2019-12-03 12:53:27
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 anything on the page. This is what I have so far (it is in Kotlin (not Java)): And here is the error that

How to change a title color in Chrome Custom Tabs

依然范特西╮ 提交于 2019-12-03 11:24:19
问题 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 change a title color. String url = "www.google.com"; CustomTabsIntent.Builder intentBuilder = new CustomTabsIntent.Builder(); intentBuilder.setToolbarColor(getResources().getColor(R.color.primary)); intentBuilder.setShowTitle(true); intentBuilder.setCloseButtonIcon(BitmapFactory.decodeResource

Google SignIn in app without adding it in device accounts

别等时光非礼了梦想. 提交于 2019-12-03 06:42:01
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 being used in a warehouse and one device is being used by multiple users. We do not want all the users to add their accounts to every device. It seems like a fairly reasonable use-case but I can’t seem to find a official documentation for cases like this. Is there any work around to this? Update: Here is the use case in little more detail. Imagine 100 devices for 500 employees. None of the users have a

How to change a title color in Chrome Custom Tabs

≡放荡痞女 提交于 2019-12-03 01:48:57
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 change a title color. String url = "www.google.com"; CustomTabsIntent.Builder intentBuilder = new CustomTabsIntent.Builder(); intentBuilder.setToolbarColor(getResources().getColor(R.color.primary)); intentBuilder.setShowTitle(true); intentBuilder.setCloseButtonIcon(BitmapFactory.decodeResource(getResources(), R.drawable.ic_arrow_back)); intentBuilder.setStartAnimations(getActivity(), R.anim.slide_in

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

こ雲淡風輕ζ 提交于 2019-12-02 23:42:25
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. 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 that, create an intent filter and add a data tag with a custom scheme, such as myapplication://logincallback