realy need help to a app


Last Updated:

  1. zanderdk

    zanderdk New Member This Topic's Starter

    Joined:
    Aug 2, 2010
    Messages:
    2
    Likes Received:
    0
    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

    Joined:
    Apr 20, 2010
    Messages:
    142
    Likes Received:
    23
    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

    Joined:
    Aug 20, 2010
    Messages:
    3
    Likes Received:
    0
    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...