Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9269635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:10:26+00:00 2026-06-18T15:10:26+00:00

I am able to load a html page in a webview successfully. I can

  • 0

I am able to load a html page in a webview successfully. I can also get the url which is clicked on webview by setting the webviewclient. But what i want is something diffrent, i have a webview which loads a web page and also a button on click of which i want all the urls present in that web page. How do i do this?

So far the code i have tried is

dialog = ProgressDialog.show(Activity.this, null, null);
    dialog.setContentView(R.layout.loader);

    w.setWebViewClient(new MyWebViewClient());

    w.loadDataWithBaseURL("same://ur/l/tat/does/not/work", string_html,
            "text/html", "utf-8", null);

private class MyWebViewClient extends WebViewClient {

    @Override
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        view.loadUrl(url);
        return true;
    }

    @Override
    public void onPageStarted(WebView view, String url, Bitmap favicon) {
        super.onPageStarted(view, url, favicon);

        if (url.startsWith("http://")) {
            System.out.println("INSIDE IF"); // NON-NLS
            view.stopLoading();

            urlToSend = url;

            System.out.println("in " + urlToSend);

            Intent intent = new Intent(DetailNews.this, Web.class);
            intent.putExtra("Web", url);
            startActivity(intent);

        }
    }

    @Override
    public void onPageFinished(WebView view, String url) {
        super.onPageFinished(view, url);

        dialog.dismiss();
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T15:10:27+00:00Added an answer on June 18, 2026 at 3:10 pm

    If you want to get all urls on page you need html parser. Try jsoup
    If you don’t want to use external libs on your project you can create own parser.

    1) Load source page via HttpUrlConnection or HttpClient

    2) Use some reader to iterate page content by line

    3) Create regexp expression to extract links.

    Similar post

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am able to load text or html page into the contentpane by request
I have a page http://www.sample.com/load.html ,which loads javscript file http://example.com/test.js which contains code for
I am not able to load an external html page into a div in
I've got a web page which needs to be able to load files into
Im not able to load the page with circlepageindicator. This is the xml <FrameLayout
In my treeview I'm able to load xml data with images but this code
I have designed a tabbed page. I'm able to load forms in the tabs
I've just starting learning jQuery and AJAX. I'm able to load a local page
I have an html page that calls some javascript and jQuery functions and also
$content = file_get_contents(http://www.domain.com/page.html); $dom = new DOMDocument(); if (!@$dom->loadHTML($content)) die (Couldn't load file?); $title

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.