在Android ICS android \ frameworks \ base \ core \ res \ res \ values \ config.xml中,config_useragentprofile_url可以從原始註釋中設置瀏覽器的頭部ua配置文件鏈接。設置一個值然後嘗試從tcpdump日誌中,我們不能在標頭請求中的ua配置文件鏈接。代碼可能無效。有誰知道爲什麼代碼無法工作?謝謝[瀏覽器]爲什麼config_useragentprofile_url無法工作
<!-- 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>
最後,我們自己實現這個。在Tab.java中,public void loadUrl(String url,Map headers){... \t headers.put(「x-wap-profile」,HERMES_UAPURL); .... } 謝謝! –