change user agent of customtabs in android

1.8k views Asked by At

I am using customtabs in android app. I want to load desktop view of website in it. So I want to change the user agent of customtabs. How to do this? I have done this in WebView but could not find any method to change user agent of customtabs.

1

There are 1 answers

2
Egor Pasko On

Changing user agent is not possible with customtabs, and would be hard to implement. Setting request-desktop-site for a custom tab is not available either.

The justification for this feature is confusing to me: why is it better to have desktop version in custom tabs and mobile version in regular Chrome? What should happen when menu item "Open in Chrome" is selected?