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

  • Home
  • SEARCH
  • 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 9252089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:51:30+00:00 2026-06-18T10:51:30+00:00

I am retrieving image from url and display them in imageview . but my

  • 0

I am retrieving image from url and display them in imageview. but my code is giving me null message.

ImageView imageview = (ImageView) findViewById(R.id.imageView1);
try {
    Uri uri=Uri.parse("http://10.0.2.2:8083/call/rahul.jpg");
    // uri.buildUpon().appendQueryParameter("key", "Android developer");
    URI u = new URI(uri.toString());
    System.out.println("path is "+u);
    HttpClient httpclient = new DefaultHttpClient();
    HttpGet httpget = new HttpGet();
    httpget.setURI(u);
    //httpget.setEntity(new UrlEncodedFormEntity(nameValuePairs));
    HttpResponse response = httpclient.execute(httpget);
    HttpEntity entity = response.getEntity();
    is = entity.getContent(); 

    Bitmap bitmap = BitmapFactory.decodeStream(is);
    imageview.setImageBitmap(bitmap); 
} catch(Exception e) {
    System.out.println("this is the error "+e.getMessage()); 
}

logcat:-

02-04 19:32:35.355: D/dalvikvm(679): threadid=1: still suspended after undo (sc=1 dc=1)
02-04 19:32:35.355: I/dalvikvm(679): Wrote stack traces to '/data/anr/traces.txt'
02-04 19:32:35.895: I/dalvikvm(679): threadid=3: reacting to signal 3
02-04 19:32:35.915: D/dalvikvm(679): threadid=1: still suspended after undo (sc=1 dc=1)
02-04 19:32:35.915: I/dalvikvm(679): Wrote stack traces to '/data/anr/traces.txt'
02-04 19:32:36.425: I/dalvikvm(679): threadid=3: reacting to signal 3
02-04 19:32:36.445: D/dalvikvm(679): threadid=1: still suspended after undo (sc=1 dc=1)
02-04 19:32:36.445: I/dalvikvm(679): Wrote stack traces to '/data/anr/traces.txt'
02-04 19:32:36.992: I/dalvikvm(679): threadid=3: reacting to signal 3
02-04 19:32:37.005: D/dalvikvm(679): threadid=1: still suspended after undo (sc=1 dc=1)
02-04 19:32:37.005: I/dalvikvm(679): Wrote stack traces to '/data/anr/traces.txt'
02-04 19:32:37.565: I/dalvikvm(679): threadid=3: reacting to signal 3
02-04 19:32:37.585: D/dalvikvm(679): threadid=1: still suspended after undo (sc=1 dc=1)
02-04 19:32:37.585: I/dalvikvm(679): Wrote stack traces to '/data/anr/traces.txt'
02-04 19:32:38.105: I/dalvikvm(679): threadid=3: reacting to signal 3
02-04 19:32:38.125: D/dalvikvm(679): threadid=1: still suspended after undo (sc=1 dc=1)
02-04 19:32:38.125: I/dalvikvm(679): Wrote stack traces to '/data/anr/traces.txt'
02-04 19:32:38.645: I/dalvikvm(679): threadid=3: reacting to signal 3
02-04 19:32:38.665: D/dalvikvm(679): threadid=1: still suspended after undo (sc=1 dc=1)
02-04 19:32:38.665: I/dalvikvm(679): Wrote stack traces to '/data/anr/traces.txt'
02-04 19:32:39.175: I/dalvikvm(679): threadid=3: reacting to signal 3
02-04 19:32:39.195: D/dalvikvm(679): threadid=1: still suspended after undo (sc=1 dc=1)
02-04 19:32:39.205: I/dalvikvm(679): Wrote stack traces to '/data/anr/traces.txt'
02-04 19:32:39.695: I/dalvikvm(679): threadid=3: reacting to signal 3
02-04 19:32:39.716: D/dalvikvm(679): threadid=1: still suspended after undo (sc=1 dc=1)
02-04 19:32:39.716: I/dalvikvm(679): Wrote stack traces to '/data/anr/traces.txt'
  • 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-18T10:51:31+00:00Added an answer on June 18, 2026 at 10:51 am

    Well since you’ve said that what I suggested worked well for you, I guess I should submit it as an answer. I observed that you seem to be a long way off a working solution, and that since this problem has been solved many times before you might wish to use a library such as android-query. I have no affiliation with that library – I’ve just used it myself before. Also, since I didn’t technically answer your question, although I solved your problem, I’d better do a little more for the green tick, eh?

    Your usage of the library looks fine, and you don’t need to call recycle (you can find that on Google easily btw). Note that you can do lots of other nice stuff with it too, such as fading in the images when they load, downsampling them as they load if they are very large, and more. You can find lots of examples on the android-query site.

    As for your query about whether it is free, the license is declared on the main page I linked to, on the left hand side near the top. It’s the Apache License 2.0. In short this license allows you to use the library freely, as long as you include a copy of the Apache License in any distribution of your app and clearly mention any libraries you use under the license. Or you can read the blurb from their FAQ. You would typically put in an about screen in your app for this kind of thing, that clearly says you are using the android-query library under the Apache 2.0 license, with a viewable copy of the license. Proper attribution: I think you’ll agree it’s a small price to pay for so many useful things you can find under this license :o)

    Good luck with your app!

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

Sidebar

Related Questions

I am retrieving a list of items from a URL and displaying them in
I am having some problems retrieving a xml from url with the following code:
I am retrieving an image from SQL Server to display on a new page
I am retrieving an image from the SQL database into Byte() variable in VB.NET.
I'm retriving image from a IO file manager (one's installed). Anyhow when I try
I'm retrieving the following content from URL for XML parsing. My problem is in
Am retrieving XML file from the url and i got the images through parsing
I am trying to retrieving image from sql server 2005 into asp.net web page
I am retrieving an image from my SQLite table and converting it to a
I am retrieving an image(as a Bitmap) from res/drawable folder and displaying it using

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.