aboutsummaryrefslogtreecommitdiffstats
path: root/AndroidAsyncSample
diff options
context:
space:
mode:
authorKoushik Dutta <koushd@gmail.com>2013-03-19 15:39:22 -0700
committerKoushik Dutta <koushd@gmail.com>2013-03-19 15:39:22 -0700
commit0f356ddb0d0f8667ce53959d4d890ab07cbd7f67 (patch)
treecd2793e28365e526ad954a2be72f67168642800e /AndroidAsyncSample
parent76bbb30c90f510f218866ac52c609e30624d6bbe (diff)
downloadAndroidAsync-0f356ddb0d0f8667ce53959d4d890ab07cbd7f67.tar.gz
AndroidAsync-0f356ddb0d0f8667ce53959d4d890ab07cbd7f67.tar.bz2
AndroidAsync-0f356ddb0d0f8667ce53959d4d890ab07cbd7f67.zip
allow creation of instances of AsyncHttpClient. This is a breaking change.
Can be fixed by simply changing: AsyncHttpClient.method(...) to: AsyncHttpClient.getDefault().method(...)
Diffstat (limited to 'AndroidAsyncSample')
-rw-r--r--AndroidAsyncSample/src/com/koushikdutta/async/sample/MainActivity.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/AndroidAsyncSample/src/com/koushikdutta/async/sample/MainActivity.java b/AndroidAsyncSample/src/com/koushikdutta/async/sample/MainActivity.java
index a54eecf..ae31779 100644
--- a/AndroidAsyncSample/src/com/koushikdutta/async/sample/MainActivity.java
+++ b/AndroidAsyncSample/src/com/koushikdutta/async/sample/MainActivity.java
@@ -54,7 +54,7 @@ public class MainActivity extends Activity {
}
private void getFile(final ImageView iv, String url, final String filename) {
- AsyncHttpClient.get(url, filename, new AsyncHttpClient.FileCallback() {
+ AsyncHttpClient.getDefault().get(url, filename, new AsyncHttpClient.FileCallback() {
@Override
public void onCompleted(Exception e, AsyncHttpResponse response, File result) {
if (e != null) {
@@ -85,7 +85,7 @@ public class MainActivity extends Activity {
try {
AsyncHttpPost post = new AsyncHttpPost("http://chart.googleapis.com/chart");
post.setBody(writer);
- AsyncHttpClient.execute(post, filename, new AsyncHttpClient.FileCallback() {
+ AsyncHttpClient.getDefault().execute(post, filename, new AsyncHttpClient.FileCallback() {
@Override
public void onCompleted(Exception e, AsyncHttpResponse response, File result) {
if (e != null) {