24

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.

2 Answers 2

33

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.

9

It's a user permission:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.