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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:44:58+00:00 2026-06-02T05:44:58+00:00

I want to set ImageView bitmap from our network drive. But i getting Unable

  • 0

I want to set ImageView bitmap from our network drive. But i getting Unable to connect to server: Unable to log in to server (PASS): 141.11.11.247 error.

Here is my download ant setBitmap code for this :

public class ResimCek implements Runnable {

    int resimID = 0;

    public ResimCek(int parcaID) {
        // store parameter for later user
        resimID = parcaID;
    }

    public void run() {
        try {
            ImageView resim = (ImageView) findViewById(resimID);
            Bitmap bitmap = BitmapFactory
                    .decodeStream((InputStream) new URL(
                            "file://141.11.11.247/foto_metod/Parca/"
                                    + Integer.toString(resimID) + ".jpg")
                            .getContent());
            resim.setImageBitmap(bitmap);
        } catch (MalformedURLException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

Here is my last code :


public class ResimCek implements Runnable {

    int resimID = 0;

    public ResimCek(int parcaID) {
        // store parameter for later user
        resimID = parcaID;
    }

    public void run() {

        int resID = getResources().getIdentifier(Integer.toString(resimID) , "tag", getPackageName()); 
        ImageView resim = (ImageView) findViewById(resID);

        Drawable image = ImageOperations(getBaseContext(),"http://141.11.11.206/parca/" + Integer.toString(resimID) + ".jpg" ,"I" + Integer.toString(resimID) + ".jpg");
        // ******************************************************
        resim.setImageDrawable(image); // I GOT THE ERROR HERE!!!
    }
}
private Drawable ImageOperations(Context ctx, String url, String saveFilename) {
    try {
        InputStream is = (InputStream) this.fetch(url);
        Drawable d = Drawable.createFromStream(new URL(url).openConnection().getInputStream(),saveFilename);
        return d;
    } catch (MalformedURLException e) {
        e.printStackTrace();
        return null;
    } catch (IOException e) {
        e.printStackTrace();
        return null;
    }
}

public Object fetch(String address) throws MalformedURLException,IOException {
    URL url = new URL(address);
    Object content = url.getContent();
    return content;
}


Thanks for your help.

  • 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-02T05:45:01+00:00Added an answer on June 2, 2026 at 5:45 am

    may be you forgot to declare internet permission in your manifest file, check it please.

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

Sidebar

Related Questions

I want to read image from web ex. http://www.abc.com/image1.jpg and dynamic set to imageview
I want set Listbox background to transparent but not working Is there any idea?
i want set class for repeater when doPostBack for those dataID i wan but
I want to set the Image to be Selected from the Android Gallery. I
I want to rotate an imageview from 30 degrees on each click on a
I am developing an application.In that I want to set the image for imageview.So
i am using 9 image view's i want set images to imageview randomly ,
i am getting bitamap from a url. Everything is fine but i m having
I'll keep this simple. I want to set an ImageView in an AlertDialog to
i am using android:layout_marginTop=100dip in my imageview,i want to set margin top to each

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.