views:

5238

answers:

5

I was trying following example but with external URLs:

http://android-developers.blogspot.com/2008/09/using-webviews.html

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.

+6  A: 

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.

Tahir Akhtar
+1  A: 

It's a user permission:

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

A: 

i want to open my yahoo id from using intent. I am sending my code just check it out and answer my doubt as m stuck badly. Hope i'll get right answer.

Karan
A: 

cont...

What I should add to the AndroidManifest.xml. What a permission is reqd. And is there any changes to be made in main.xml file. Or give whole code.

Karan
A: 

6 was right. thanks :)

Azeem