Browser [浏览器]为什么config_useragentprofile_url无法工作

Browser [浏览器]为什么config_useragentprofile_url无法工作,browser,frameworks,webkit,Browser,Frameworks,Webkit,在Android ICS Android\frameworks\base\core\res\res\values\config.xml中,从原始注释中,config_useragentprofile_url可以设置浏览器的标题ua配置文件链接。在设置一个值之后,然后从tcpdump日志中尝试,我们无法在标头的请求中创建ua配置文件链接。 代码可能会失效。有谁知道为什么代码不能工作?谢谢 <!-- The URL that should be sent in an x-wap-profile

在Android ICS Android\frameworks\base\core\res\res\values\config.xml中,从原始注释中,config_useragentprofile_url可以设置浏览器的标题ua配置文件链接。在设置一个值之后,然后从tcpdump日志中尝试,我们无法在标头的请求中创建ua配置文件链接。 代码可能会失效。有谁知道为什么代码不能工作?谢谢

<!-- The URL that should be sent in an x-wap-profile header with an HTTP request,
     as defined in the Open Mobile Alliance User Agent Profile specification
     OMA-TS-UAProf-V2_0-20060206-A Section 8.1.1.1. If the URL contains a '%s'
     format string then that substring will be replaced with the value of
     Build.MODEL. The format string shall not be escaped. -->
<string name="config_useragentprofile_url" translatable="false"></string>
    public void loadUrl(String url, Map<String, String> headers) {                                 ...                                                                                          headers.put("x-wap-profile", HERMES_UAPURL);          



}


我在ics上也有同样的问题。要想实现您想要的功能,必须实现uaprofile特性。Plz指的是websetting、jni、外部网络、lib核心等的用户代理。不幸的是,由于办公室政策和运营商合同,我无法共享我的代码。祝你好运

最后,我们自己实现了这一点。在Tab.java中

    public void loadUrl(String url, Map<String, String> headers) {                                 ...                                                                                          headers.put("x-wap-profile", HERMES_UAPURL);          



}
publicvoidloadurl(字符串url,映射头){…headers.put(“x-wap-profile”,HERMES_UAPURL);
}

谢谢

最后,我们自己实现了这一点。在Tab.java中,public void loadUrl(字符串url,映射头){…headers.put(“x-wap-profile”,HERMES_UAPURL);}Thx!
    public void loadUrl(String url, Map<String, String> headers) {                                 ...                                                                                          headers.put("x-wap-profile", HERMES_UAPURL);          



}