Search Engine

Tuesday, December 14, 2010

Download Image on SDCard From URL In Android

Hello ,

This Articles for Download Image On SDCard From URL.

This is very simple code for download image on sdcard.

In download image on sdcard You have to give three permission from AndroidMenifest.xml file.

This are the three Permission Given below.

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
<uses-permission android:name="android.permission.READ_PHONE_STATE"></uses-permission>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>

This are the very important permision for downloadin image on sdcard in android.

Now in res/values/string.xml file change your URL. For giving any URL And download image

file from URL. And this image save on sdcard.

This are very simple code for image save on sdcard in android.

And This are given below Image. Downloaded Image save on sdcard.

If you Download Project Click Here Download

So I think this are very useful code for developer.


Anonymous said...

No examples? Just raw code without any idea of how to use it?

Needs a lot of clean up. Slightly messy.
EX: Multiple packages imported, but never used. saveToSDCard has the 2 main state variables set to FALSE 2 times if no SD card. Etc.

Good as a source of raw code though.

Naba said...

Thankx a lot. Its working fine and lots of things to learn in the code.

wassim said...

so nice, thank you :)

Anonymous said...

Nice Tutoril............,can u please post, how to upload mp3 + picture to any website.

Post a Comment