Codename One - BrowserComponent: custom user-agent

前端 未结 1 1658
温柔的废话
温柔的废话 2020-12-20 07:53

I\'ve read the BrowserComponent API, but I didn\'t find any setUserAgent() method. How can I force the BrowserComponent to use a custom user-agent string?

Thank you

相关标签:
1条回答
  • 2020-12-20 08:04

    It's not really documented since it isn't supported everywhere but should work fine on Android and iOS. This should work:

    browserComponent.setProperty("useragent", yourUserAgentHere);
    
    0 讨论(0)
提交回复
热议问题