aboutsummaryrefslogtreecommitdiffstats
path: root/AndroidAsyncSample/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'AndroidAsyncSample/src/com')
-rw-r--r--AndroidAsyncSample/src/com/koushikdutta/async/sample/MainActivity.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/AndroidAsyncSample/src/com/koushikdutta/async/sample/MainActivity.java b/AndroidAsyncSample/src/com/koushikdutta/async/sample/MainActivity.java
index e102ddd..100fc6e 100644
--- a/AndroidAsyncSample/src/com/koushikdutta/async/sample/MainActivity.java
+++ b/AndroidAsyncSample/src/com/koushikdutta/async/sample/MainActivity.java
@@ -45,8 +45,8 @@ public class MainActivity extends Activity {
return true;
}
- private void downloadFile(final ImageView iv, String url, final String filename) {
- AsyncHttpClient.download(url, filename, new AsyncHttpClient.FileCallback() {
+ private void getFile(final ImageView iv, String url, final String filename) {
+ AsyncHttpClient.get(url, filename, new AsyncHttpClient.FileCallback() {
@Override
public void onCompleted(Exception e, AsyncHttpResponse response, File result) {
if (e != null) {
@@ -73,8 +73,8 @@ public class MainActivity extends Activity {
tether.setImageBitmap(null);
desksms.setImageBitmap(null);
- downloadFile(rommanager, "https://raw.github.com/koush/AndroidAsync/master/rommanager.png", getFileStreamPath(randomFile()).getAbsolutePath());
- downloadFile(tether, "https://raw.github.com/koush/AndroidAsync/master/tether.png", getFileStreamPath(randomFile()).getAbsolutePath());
- downloadFile(desksms, "https://raw.github.com/koush/AndroidAsync/master/desksms.png", getFileStreamPath(randomFile()).getAbsolutePath());
+ getFile(rommanager, "https://raw.github.com/koush/AndroidAsync/master/rommanager.png", getFileStreamPath(randomFile()).getAbsolutePath());
+ getFile(tether, "https://raw.github.com/koush/AndroidAsync/master/tether.png", getFileStreamPath(randomFile()).getAbsolutePath());
+ getFile(desksms, "https://raw.github.com/koush/AndroidAsync/master/desksms.png", getFileStreamPath(randomFile()).getAbsolutePath());
}
}