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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:03:25+00:00 2026-05-18T06:03:25+00:00

i am trying to get an image from a https url but it doesnt

  • 0

i am trying to get an image from a https url but it doesnt seem to display and get the image correctly but works fine on my computer browser.

i have tested out a http url pointing to a different image and it works fine.

my code is below:

public Bitmap getContactPhoto(String url) {
        Bitmap pic = null;
        try {
            pic = BitmapFactory
                    .decodeStream((InputStream) new URL(
                            "https://mail.google.com/mail/photos/static/AD34hIjbK2m-Lj333E4nBcCkBC3MYl2tTs0xizuSqUOP3-Jd6DOrpFg1M5HG8jXh0MuPbeFepInZZDu92Dx8ST4b59EbOKmfYTortuuO3P1_Ohyu7b7a3gc")
                            .getContent());
        } catch (MalformedURLException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

        return pic;

    }

here is the code from the activity class that calls the method above:

private ImageView mContactPhoto;
private ContactDetailsViewHelper mViewHelper;

mContactPhoto = (ImageView) findViewById(R.id.contact_photo);
mViewHelper = new ContactDetailsViewHelper(mContext);
mContactPhoto.setImageBitmap(mViewHelper.getContactPhoto(mDetail.getImageRef()));

ignore the mDetail.getImageRef, that passes the real url value but for this case i tried hard coding the url as you can see from the getContactPhoto method.

thanks

  • 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-05-18T06:03:25+00:00Added an answer on May 18, 2026 at 6:03 am

    You are only able to see it in the browser because you’re logged into GMail and have the appropriate cookies to prove it. Try viewing the image after logging out or by opening Incongnito/Private Browsing/InPrivate window. You’d need to find another source of this image.

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

Sidebar

Related Questions

I am trying to display an image from a URL, which may be larger
I'm trying to get the pixel information from an image and have got to
I trying to use ImageInfo and Jython to get information from a image on
I am trying to do this... <Image x:Name=imgGroupImage Source=Images\unlock.png Margin=0,0,5,0 /> But I get
I am trying to get an image from an HTTP server using Perl. I
I'm trying get values from a GridView using the following code: foreach (GridViewRow row
Trying to get an ASP application deployed; it worked for a while but then
Trying to get this example working from http://www.munna.shatkotha.com/blog/post/2008/10/26/Light-box-effect-with-WPF.aspx However, I can't seem to get
I'm trying to write a PNG file from a image retrieved from the web.
Trying to get my css / C# functions to look like this: body {

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.