xcesco
xcesco

Reputation: 4838

Use an OkHttpClient with Chrome Custom Tab

I'm working on an Android application. I need to invoke a web page and I want to try Chrome Custom Tabs. In my experience on Android development, I used the WebView to accomplish this task, specifying the client to use OkHttpClient. This is useful when I need to customize the Http client (add header, set the timeout, etc). Is it possible to use the OkHttpClient with the Chrome Custom Tabs?

Upvotes: 0

Views: 430

Answers (1)

gmetal
gmetal

Reputation: 2988

No it is not possible to do what you are asking. This is because you will be using an external application (e.g. Chrome, Firefox, etc), completely outside your control. With Chrome Custom Tabs you can customize the look and feel of the browser and very minor details (that you can find here), but you cannot control how the browser will access the target URL. That will be completely controlled by the browser implementing the Chrome Custom tabs functionality.

Upvotes: 3

Related Questions