I am working. On application downloading xml file.
Asked
Active
Viewed 108 times
-6
-
`Are you check it ?` http://stackoverflow.com/questions/5472226/how-to-save-file-from-website-to-sdcard – Samir Mangroliya Mar 27 '12 at 13:45
1 Answers
3
Yes, you can make any outbound HTTP connection you wish. If you know the URL of the file you want to download, just perform an HTTP GET on it.
you must request the INTERNET permission.
<uses-permission android:name="android.permission.INTERNET" />
From there, it's just a matter of using the Apache HTTP client libraries that are part of the Android SDK,
http://developer.android.com/reference/org/apache/http/package-summary.html
For an example using HTTP client, you can look at this source file,
http://code.google.com/p/csdroid/source/browse/trunk/src/org/jtb/csc/CSCManager.java
and find the readUrl()
method. there are many, many other examples of using Apache HTTP client out there, just Google for it.

Jeffrey Blattman
- 22,176
- 9
- 79
- 134