0

How do i access an image and display it in my android application from a server. Please help me out.

Girish Koundinya
  • 143
  • 3
  • 12

2 Answers2

0

You need to download image.

Make a function which will retrieve Bitmap.

This is shown here :Click here

Community
  • 1
  • 1
Krishna Suthar
  • 3,071
  • 6
  • 31
  • 37
0

I'm new also on android development but I did that on one of my learning apps. If its a URL then you do the following:

              Drawable picture;
                      try {
                   URL picurl = new URL("some URL");
                   InputStream content = (InputStream)picurl.getContent();
                   picture = Drawable.createFromStream(content , "src"); 
               }
               catch(Exception e){
                           //handle the Exception 
                       }
ndalama
  • 1,635
  • 3
  • 17
  • 15