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
2010-09-07 11:12:51
+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
2010-09-07 11:24:32
Ok, thank you. But it does'nt tell me how to get the image file from an URL ?
nonozor
2010-09-09 02:49:36
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
2010-09-09 04:59:35
Thanks a lot :)
nonozor
2010-09-09 18:47:31