views:

59

answers:

2

I want to download image from distant server and use it as resource. Is it possible ? How can I do this ?

+1  A: 

Is it possible ?

You can download an image. It will not be a "resource", though. Resources are packaged inside the APK and cannot be modified or added to at runtime.

CommonsWare
+1  A: 

Yes you cannot download it as a resource file..you can download and store images on your SDCard or database and load it from there...

To check how to download images to SDCard refer to this link

http://snippets.dzone.com/posts/show/8685#related

You can later load it from your SDCard like this

http://android-er.blogspot.com/2010/01/how-to-display-jpg-in-sdcard-on.html

This is how you store and retrieve images from ur DB

http://www.helloandroid.com/tutorials/store-imagesfiles-database

Rahul
Ok, thank you. But it does'nt tell me how to get the image file from an URL ?
nonozor
You can do a bit of googling to find that out...In case you were not able to find it refer to this link http://thinkandroid.wordpress.com/2009/12/25/converting-image-url-to-bitmap/
Rahul
Thanks a lot :)
nonozor