I've got a webView class in a simple android app. I'm trying to get webView to load a webpage hosted on a server on my local network and it can't connect.
WebView webview = new WebView(this);
setContentView(webview);
webview.loadUrl("192.168.1.104");
webView says 'web page not available'
I can connect to 192.168.1.104 in a regular browser and any mobile browser.
When I replace 192.168.1.104
with http://example.com
it works.
Did you add the internet permission to the AndroidManifest.xml?
<uses-permission android:name="android.permission.INTERNET"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With