1. Are you ready for the Galaxy S20? Here is everything we know so far!

realy need help to a app

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

  1. zanderdk

    zanderdk Lurker
    Thread Starter

    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;
    }
    });
    }
    }
     



    1. Download the Forums for Android™ app!


      Download

       
  2. id0001

    id0001 Well-Known Member

    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 Lurker

    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
     
Loading...
Similar Threads - realy need help
  1. GeneralGhest
    Replies:
    24
    Views:
    607
  2. John9870
    Replies:
    6
    Views:
    389
  3. ArtSera
    Replies:
    8
    Views:
    636
  4. AnPuzzledPhoneOwner
    Replies:
    3
    Views:
    506
  5. codezer0
    Replies:
    7
    Views:
    698
  6. helppls
    Replies:
    4
    Views:
    655
  7. codezer0
    Replies:
    35
    Views:
    2,091
  8. ilus4
    Replies:
    4
    Views:
    578
  9. hstroph
    Replies:
    3
    Views:
    808
  10. grizmixstir
    Replies:
    3
    Views:
    703

Share This Page

Loading...