aboutsummaryrefslogtreecommitdiffstats
path: root/AndroidAsyncSample
diff options
context:
space:
mode:
authorKoushik Dutta <koushd@gmail.com>2012-10-17 18:15:37 -0700
committerKoushik Dutta <koushd@gmail.com>2012-10-17 18:15:37 -0700
commit1a2843bfe64ea1bf92973c7391ae03093a3b4a2b (patch)
tree3deeb3ab4e8d1f9afc741e1260f957212cb356a2 /AndroidAsyncSample
parent1f131ce28f8b25aec4d8d8fcab68d8f55de08bcf (diff)
downloadAndroidAsync-1a2843bfe64ea1bf92973c7391ae03093a3b4a2b.tar.gz
AndroidAsync-1a2843bfe64ea1bf92973c7391ae03093a3b4a2b.tar.bz2
AndroidAsync-1a2843bfe64ea1bf92973c7391ae03093a3b4a2b.zip
various refactorings. add support for a buffer limit on BufferedDataSink./
Diffstat (limited to 'AndroidAsyncSample')
-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());
}
}