WebView Error on net::ERR_CONNECTION_REFUSED
Asked Answered
H

1

9

enter image description here

This is the code snippet that I use

final WebView webVu=(WebView)findViewById(R.id.webView1);
webVu.loadUrl("someURL");
webVu.getSettings().setJavaScriptEnabled(true);

I tried so many solutions like setting the correct date time and all on AVD.

Giving internet permissin in manifest

<uses-permission android:name="android.permission.INTERNET" />

But nothing worked so far.

Heptarchy answered 12/2, 2015 at 15:56 Comment(0)
B
5

There is

http://www.ipchicken.com/

But there is no

https://www.ipchicken.com/

enter image description here

Wrong URL is the problem here

Bayles answered 12/2, 2015 at 16:1 Comment(3)
ah small mistake...the webpage doesn't fit in the webview ...I always get scrollbar ..Do you know how to solve the problem ? when I searched in the internet they say ..one has to include ViewPort meta tag in the web page...But it won't solve my problem anyhow.Heptarchy
This would do webVu.setInitialScale(100);Bayles
As my answer is useful you could accept my post as answer and upvote it so that others will know if the answer is worthy and get benifited of it.Bayles

© 2022 - 2024 — McMap. All rights reserved.