"Hello, WebView" tutorial opens the requested address in Android browser and not in my webview

Posted by VitalyB on Stack Overflow See other posts from Stack Overflow or by VitalyB
Published on 2010-05-23T22:47:34Z Indexed on 2010/05/23 22:50 UTC
Read the original article Hit count: 777

Filed under:
|
|

Hi everyone,

I am using Android emulator with AVD of Android 2.1 and I have the following problem: Trying to load a URL in a WebView using webView.loadUrl causes it to open in the browser instead.

Note: I am talking about the initial opening, not the issue in which links from the WebView open in a browser, though, perhaps it is somehow connected.

I've tried several things:

  • I've removed <uses-permission android:name="android.permission.INTERNET" /> from the manifest. That actually made it work correctly, i.e, load the html into the webview. However, as one would expect, the only thing it loaded is "unable to connect the internet" error page.
  • I've tried downloading a real sample project ("Hello Android" book source files, project - BrowserView). However, it didn't work just the same.
  • I've created a new project and followed the directions at Google's official tutorial of using WebView and got the same result.

I haven't find anyone else complaining about it. Why does it happen?

Thanks, Vitaly

© Stack Overflow or respective owner

Related posts about android

Related posts about android-emulator