Questions tagged [loopj]

Use this tag for the HTTP Client for Android developed by James Smith, alias Loopj.

Loopj (loopj.com) is website and twitter handle of James Smith, a British entrepreneur and engineer based in San Francisco.

As a tag, it is mostly used for HTTP Client for Android developed by him.

http://loopj.com/android-async-http/

240 questions
0
votes
1 answer

Multiple calls using AsyncHttpResponseHandler

I am working on an app that loads a list of json data from a website, into a list. Within that list, each item has an image associated with it. The MediaAdapter works with each row, and calls an async load for each image. The issue comes…
Mark Headley
  • 376
  • 1
  • 4
0
votes
3 answers

Android loopj AsyncHttpClient, parsing JSON example

I was looking for a simple example on parsing a JSON file, using the loopj AsyncHttpClient. But so far I could not find any useful information. :( Simple JSON file to parse: { "contact": [ { "id": "10", …
Edmond Tamas
  • 3,148
  • 9
  • 44
  • 89
0
votes
1 answer

SocketTimeoutException on first HTTP call

I am getting java.net.SocketTimeoutException when I invoke the HTTP get, put, post or delete. But then when I click the button again to make another HTTP call, then it is successful. It seems that the AsyncTask/doInBackground doesn't fail like this.…
Noman Arain
  • 1,172
  • 4
  • 19
  • 45
0
votes
1 answer

com.loopj.android.http.RequestParams Don't works with put(String key, Object value)

RequestParams have put Object method,put(String key, Object value). so I use the code below; On the server, the userId cann't find in get or post paramenters. com.loopj.android.http.RequestParams params= new RequestParams (); //添加参数 add…
wei-song
  • 17
  • 5
0
votes
0 answers

loopj - Socket Timeout - response body is null, calling onFailure(Throwable, JSONObject)

I seem to be getting intermittent SocketTimeout exceptions when either calling GET or POST using the loopj library for Android. However this error only seems to be an issue on certain versions of android. That being said I've removed the SSL…
Garbit
  • 5,805
  • 6
  • 39
  • 72
0
votes
1 answer

How to make async methods that return a boolean?

I have the following method: public static boolean getIsUp() { String method = "isup.php"; AsyncHttpResponseHandler response = new AsyncHttpResponseHandler(){ @Override public void onSuccess(String…
0
votes
1 answer

Loopj AsyncHttpResponseHandler store onSuccess response

I try to store the response string of the AsyncHttpResponseHandler in a class variable like this: public boolean isLatestVersion = true; private void requestServerVersionFile() { AsyncHttpClient client = new AsyncHttpClient(); …
S.Scherhak
  • 42
  • 5
0
votes
1 answer

Loopj. Get progress while downloading image using BinaryHttpResponseHandler

Thanks for such a wonderful library. Just wanted to know is there a way to get the progress or byte size downloaded while downloading big size images/files whith BinaryHttpResponseHandler. Awaiting response. Hoping to get sample code for using this.
Kozlov V
  • 146
  • 5
  • 17
0
votes
1 answer

Getting HTTP response code using Android Asynchronous Http Client (Loopj)

I'm using loopj to talk to a rest server which has different HTTP response codes for specific successful responses (i.e 200, 202). The AsyncHttpResponseHandler has an onSuccess(String content) callback but nothing that returns the HTTP response…
scoleman2272
  • 358
  • 6
  • 18
0
votes
2 answers

loopj android-async-http client causes app to crash with nullPointerException

I'm using AsyncHTTPClient(loopj.com/android-async-http/) in my app to excess json api. It works fine except when the user presses back button before asynchttpclient completes its work. It crashes the app. Here is my onFinish() method code.…
lightsaber
  • 1,481
  • 18
  • 37
0
votes
1 answer

Make this jQuery function dynamic

I'm trying yo use LoopJ (http://loopj.com/jquery-tokeninput/demo.html) autocompelte to create a functional search box. As you can see on demo page, the following code runs the autocomplete: $(document).ready(function() { …
user1738643
0
votes
1 answer

Android Async Http Client

Hi i am using LoopJ lib to get response from server in json. But the problem is that at times i get org.apache.http.conn.ConnectTimeoutException and sometimes it runs fine. I am using the GET method. But when ever i copy and paste the URl to my…
Hasham
  • 455
  • 4
  • 11
0
votes
1 answer

Android AsyncHttpResponseHandler response headers not working

I'm using loopj 1.4.3 and the following method inside AsyncHttpResponseHandler doesn't work: @Override public void onSuccess(int k, Header[] headers,String response) { onSuccess(k, response); } The onSuccess…
0
votes
2 answers

Caching json in a nice way (loopj)

I use an Asynchronous Http Client for Android for loading my JSON data.(https://github.com/h-r/android-async-http-with-caching) It works perfect, but i want to cache json files if user has no connection. I know how to check if user had internet…
Richard Lindhout
  • 2,038
  • 2
  • 23
  • 38
0
votes
2 answers

android 4 emulator cannot connect with localhost

I want to connect with my web API, its URL is http://localhost:55154/, with android emulator. AsyncHttpClient client = new AsyncHttpClient(); client.get("http://10.0.2.2:55154/api/values", new AsyncHttpResponseHandler() { @Override …
Michal
  • 11
  • 1
  • 4
1 2 3
15
16