1. Check out our app, Forums for Android! Download and leave feedback here!

realy need help to a app

Discussion in 'Application Development' started by zanderdk, Aug 2, 2010.

  1. zanderdk

    zanderdk New Member
    Thread Starter
    5

    Aug 2, 2010
    2
    0
    5
    i made a browser but it can't download plzz help

    public void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);


    WebView web = (WebView) findViewById(R.id.webView);
    web.getSettings().setJavaScriptEnabled(true);
    web.getSettings().setPluginsEnabled(true);
    web.getSettings().setSupportMultipleWindows(true);
    web.getSettings().setSupportZoom(true);
    web.setVerticalScrollBarEnabled(true);
    web.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
    web.setHorizontalScrollBarEnabled(true);
    web.getSettings().setBlockNetworkImage(false);
    web.getSettings().setLoadsImagesAutomatically(true);
    web.getSettings().setUserAgent(0);
    web.getSettings().setUseWideViewPort(true);
    web.loadUrl("http://google.com/");

    web.setWebViewClient(new WebViewClient() {
    @Override public boolean shouldOverrideUrlLoading(WebView view, String url) {
    return false;
    }
    });
    }
    }
     

    Advertisement

  2. id0001

    id0001 Well-Known Member
    38

    Apr 20, 2010
    142
    23
    38
    Student.. also software developer
    Netherlands
    It would be helpful if you explain you problem more clearly. Like what does it do now. Does it crash or just don't load the page.

    From what I can see here, you are just using a webview so my guess is that you haven't set the permissing for using the internet. If you haven't done this your app is not allowed to use the internet and therefore can't load the webpage.

    ~id
     
  3. kumaresh17

    kumaresh17 New Member
    5

    Aug 20, 2010
    3
    0
    5
    Hi I am also have the same issue My webView Doesnot load the URL
    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 brower can open the above url but through WebView It gives the Page is not available, i tried with "http://google.com" also but the same error,

    Please help
     

Share This Page

Loading...