I keep getting errorcode -6 and description net::ERR_CONNECTION_REFUSED on android webview in
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final WebView webview =(WebView) this.findViewById(R.id.webView);
WebSettings webSettings = webview.getSettings();
webSettings.setJavaScriptEnabled(true);
webview.setWebViewClient(new MyWebViewClient());//I only implemented onReceivedError to display the errors in logcat
webview.loadUrl("http://mydomainexample.com");// it loads http://google.com but throws error code = -6 for my doamin which works fine in any navigator
}
while the exact same url (example http://aaaaaaaaa.com) works well in any navigator, do webviews make connections differently from navigators? What could be causing this issue?