[email protected] wrote:
> Sure, basically I'd like to download some images and save them locally
> on the fly.
> 
> For the first part of the task I do something like this:
> 
> try {
>      URL url = new URL("someurl");
>      InputStream is = url.openStream();
>      Drawable drawable = Drawable.createFromStream(is, "");
>      myDrawable.setDrawable(drawable);
>      } catch (Exception ioe){
>             ioe.printStackTrace();
>      }
> 
> That works fine. However, I'm struggling with getting that stored on
> the external memory. Hope that makes it a bit clearer! Thanks!

Instead of going from an InputStream to a Drawable, go from an
InputStream to a File, then load the image out of the file.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to