Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的应用程序需要添加自定义用户代理,例如“***;myAppUA”。
例如,在 webview 我可以这样做:
String userAgent = settings.getUserAgentString(); userAgent += "; myAppUA"; settings.setUserAgentString(userAgent);
但我在人行横道中找不到如何做到这一点。
我在这里找到了补丁: https ://github.com/Reconers/cordova-plugin-crosswalk-webview/commit/f2b5d44b66a50b8fa4eeea9810c20cc29c601147
现在您可以在应用程序中添加 config.xml:
<preference name="AppendUserAgent" value="myAppUA" />