Codename One - BrowserComponent: custom user-agent

寵の児 提交于 2019-12-18 07:19:35

问题


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 very much for any help.


回答1:


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);


来源:https://stackoverflow.com/questions/45786836/codename-one-browsercomponent-custom-user-agent

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!