I was trying the following example, but with external URLs: Using WebViews
The example shows how to load an HTML file from assets folder (file:// url
) and display it in a WebView.
But when I try it with external URLs (like http://google.com), I am always getting a "Website Not Available" error. Android's built-in browser is able to access all external URLs.
I suspect that it has something to do with permissions, but wasn't able to confirm it.
No, Chrome for Android is separate from WebView. They're both based on the same code, including a common JavaScript engine and rendering engine.
To detect and intercept any redirection from WebView , we can use shouldOverrideUrlLoading and return true if it is supported to redirect into native page so that WebView stop the URL redirection in the web page and stay in the current page.
The short answer to this question is yes, you do need Android System WebView. There is one exception to this, however. If you're running Android 7.0 Nougat, Android 8.0 Oreo, or Android 9.0 Pie, you can safely disable the app on your phone without suffering adverse consequences.
This interface was deprecated in API level 12. This interface is now obsolete.
I found out the answer myself.
The permission name is android.permission.INTERNET.
Adding following line to the AndroidManifest.xml (nested directly in tag) did the trick:
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
The file can also be edited graphically in Eclipse plugin through permissions tab.
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