Android 带有代理设置的webView
我只知道:WebView.enablePlatformNotifications();现在已经过时了。我在活动中添加此代码Android 带有代理设置的webView,android,webview,3g,Android,Webview,3g,我只知道:WebView.enablePlatformNotifications();现在已经过时了。我在活动中添加此代码 DefaultHttpClient httpClient = new DefaultHttpClient(); HttpHost proxy = new HttpHost("X.X.X.X", portNumber); //proxy that i need httpClient.getParams().setParameter(ConnRou
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpHost proxy = new HttpHost("X.X.X.X", portNumber); //proxy that i need
httpClient.getParams().setParameter(ConnRouteParams.DEFAULT_PROXY, proxy);
我添加了以下代码:
WebView testWebView = new WebView(this);
// WebView.enablePlatformNotifications();// it's obsoleted!
testWebView.loadUrl("http://www.google.com");
结果是:我的设备无法通过3g打开google.com
我如何让testWebView知道我所使用的代理?您应该遵循此链接,这可能对您有所帮助