现在浏览器搜索用的是百度的搜索引擎,现在拼接没用word关键字转码,导致搜索拼接出问题,webview结果页直接调用shouldOverrideUrlLoading跳浏览器打开,现在转码会在全局搜索当前tab页面结果页打开,而不是直接跳浏览器。
如下:
public static String getBaiduVideoUrl(String tradeid, String word) {
String videoEncode = null;
try {
videoEncode = URLEncoder.encode(word, "utf8");
} catch (Exception e) {
CoolLogger.e(TAG,"getBaiduVideoUrl error" + e);
videoEncode = "";
}
CoolLogger.d(TAG,"videoEncode:" + videoEncode);
return "http://m.baidu.com/sf/vsearch?atn=index&vsi=1&tn=vsearch&pd=video&from={" + tradeid + "}&ua=参数&pu=参数&word=" + videoEncode;
}