Crosswalk CUSTOM 附加到用户代理

Crosswalk CUSTOM append to user agent

我的应用需要添加自定义用户代理,例如“***; 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" />