How do i access an image and display it in my android application from a server. Please help me out.
Asked
Active
Viewed 78 times
0
-
Are you getting any URL for image?? – Krishna Suthar Jun 14 '12 at 10:18
-
Yes i do have an url for the image – Girish Koundinya Jun 14 '12 at 10:33
2 Answers
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