WebView Loadurl Issue plz help


Last Updated:

  1. kumaresh17

    kumaresh17 New Member This Topic's Starter

    Joined:
    Aug 20, 2010
    Messages:
    3
    Likes Received:
    0
    Hi,
    My webView Doesnot load the URL
    foolowing code snipist

    WebView mWebView ;
    mWebView = (WebView)findViewById(R.id.mWebView);

    mWebView.getSettings().setJavaScriptEnabled(true);
    mWebView.loadUrl(
    http://developer.android.com/index.html
    );


    I have given this tag
    <uses-permissionandroid:name="android.permission.INTERNET"></uses-permission>
    in the manifest also.
    Andriod default native brower can open the above url but through my application using WebView It gives the Page is not available, i tried with "http://www.google.com" url also but the same error,
    NOTE:- I am getting error in simulator , In Andriod device it is running fine


    Please help where i am doing wrong

     

    Advertisement
  2. jonbonazza

    jonbonazza Well-Known Member

    Joined:
    Jul 13, 2010
    Messages:
    1,934
    Likes Received:
    458
    You probably do not have network enabled on your emulator.

    When you create a new AVD, you have to add GSM Modem to your list of available hardware.
     
  3. kumaresh17

    kumaresh17 New Member This Topic's Starter

    Joined:
    Aug 20, 2010
    Messages:
    3
    Likes Received:
    0

    Hi
    I have created a new AVD and added GSM Modem, but still webView gives "Web Page is not found"
    I have done Proxy setting by creating new APNs
    but it doesnot solved the problem.

    Nut Shell:-
    a) NATIVE browser display the web page with any valid URL
    b) In device webview loadUrl works fine
    c) but in simulator webview LoadUrl gives "Web Page is not found"

    please help me how to resolve it
     

Share This Page

Loading...