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 8139015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:41:25+00:00 2026-06-06T11:41:25+00:00

I am battling with this issue for a long time, dug around Google and

  • 0

I am battling with this issue for a long time, dug around Google and SO but still no luck. Finally, I am out here to get your help, please advise or help.

My problem with the following source code is that it only displays string content the images do not display instead it shows white rectangle or sometimes a blue image with question mark.

Q: How to display images?

Here is my code:

private void openURL() {

    DefaultHttpClient client = new HttpsRequest(getApplicationContext());
    HttpGet get = new HttpGet(getUrlField().getText().toString());
    // Execute the GET call and obtain the response
    HttpResponse getResponse;
    try {
        getResponse = client.execute(get);
        HttpEntity responseEntity = getResponse.getEntity();

        String content = EntityUtils.toString(responseEntity);
        getWebView().loadDataWithBaseURL(null, content, "text/html", "utf-8",
                null);

    } catch (ClientProtocolException e) {
        WSLog.e(THIS_FILE, "HTTP Error.");
        e.printStackTrace();
    } catch (IOException e) {
        WSLog.e(THIS_FILE, "Url Load Error.");
        e.printStackTrace();
    }
}

webView output:

enter image description here

  • 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-06T11:41:27+00:00Added an answer on June 6, 2026 at 11:41 am

    With the help of Vasarat and few modification from my side helped me to answer this question. I have modified the following code line as

    getWebView().loadDataWithBaseURL("http://mywebSite.com/parent_dir_to_iamges/", content, "text/html", "UTF-8","about:blank");
    

    This modification gave me the perfect output as expected.

    Please fallow the comments to understand details about the issue.

    Note: I have used http in the base url instead https…..Please let me know if I can use https. webview.Loadurl() with https url works fine if API level is 10 or above but it shows blank page for API level 8.

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

Sidebar

Related Questions

For some days i´m battling with this issue: i´m using Jquery to extract data
I've been battling with this for a few days now with no luck. I've
So I have been battling with this for some time and I need your
I've been battling with this issue for a couple of days now. I have
I'm battling out of memory issues with my application and am trying to get
So I have been battling this issue for awhile now and tried many different
I've been battling with this issue all day. I am hoping someone has an
Hi I have been battling with this issue all day. I have a vs2010
I've been battling this XSL (Saxon/Java) code for several hours now, and still can't
I've been battling with this for some time and seem to be getting nowhere.

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.