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
48
votes
9 answers

POSTing JSON/XML using android-async-http (loopj)

I am using android-async-http and really liking it. I've run into a problem with POSTing data. I have to post data to the API in the following format: - Test api support 3
Mus
  • 1,860
  • 2
  • 16
  • 19
26
votes
8 answers

Android Studio: Resolving Duplicate Classes

When I try to run my android application on an Android device, the gradle console reports the following error: Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException:…
Afflatus
  • 2,302
  • 5
  • 25
  • 40
18
votes
1 answer

Getting SocketTimeoutExceptions using loopj AsyncHttpClient... is there a timeout value I can set?

When using the loopj AsyncHttpClient library, I keep getting java.net.SocketTimeoutExceptions when making requests (see below). Is there some timeout value I can set? Note: I'm posting this to hopefully provide some help for other people. I…
loeschg
  • 29,961
  • 26
  • 97
  • 150
16
votes
5 answers

Android loopj Async Http crashes after 1.4.5 update

The new update for Android loopj Async Http lib is out and they changed a lot. Now you need to manually set Looper.prepare() otherwise it uses synchronious mode instead of async by default. I don't get where I need to set it. Logcat 07-09…
Phil
  • 583
  • 4
  • 7
  • 19
14
votes
6 answers

Self-signed certificate and loopj for Android

I'm trying to use loopj for making async HTTP requests. Works great, except when I try to access https site with self-signed cert. I get javax.net.ssl.SSLPeerUnverifiedException: No peer certificate. I guess the default ssl options can be…
bneupaane
  • 537
  • 1
  • 7
  • 16
12
votes
1 answer

Android Loopj image upload broken with WP API v1 & v2

I'm using Loopj to upload files into my WordPress site and WP REST API v1 and/or v2 (same results). The authentications goes great, headers goes great, file "uploads" but when I check it in my WordPress backend... the image or file is broken. The…
Mariano Zorrilla
  • 7,165
  • 2
  • 34
  • 52
8
votes
3 answers

Loopj Android Async Http - onFailure not fired

I am using the great async http library from loopj, but I have run into a small snag. If the user has no internet connection or loses their connection, the app just won't return anything. This part is expected, but it also doesn't fire the onFailure…
Ashley Staggs
  • 1,557
  • 9
  • 24
  • 38
7
votes
1 answer

Android loopj asynchttpclient return response

In one of my project, I am using loopj asynchttpclient for communicating with my website. The communication part working well and getting response as well My activity looks like protected void onCreate(Bundle savedInstanceState) { …
ramesh
  • 4,008
  • 13
  • 72
  • 117
7
votes
4 answers

AsyncHttpRequest POST not triggering callbacks (android-async-http by loopj)

I'm trying to send a POST to a server using loopj's async http library. The following code is pretty standard but I can't get it to work. I have debugged quite a bit and have checked the following: The URL is correct. The params are correct and…
Manuel
  • 10,153
  • 5
  • 41
  • 60
5
votes
3 answers

IOException when using loopj SyncHttpClient

I have the need to use loopj's SyncHttpClient in a couple areas. When I use AsyncHttpClient, the request returns successfully. When I use the SyncHttpClient as shown in the accepted answer here: How to use loopJ SyncHttpClient for synchronous…
mikeorr85
  • 471
  • 5
  • 13
5
votes
1 answer

Create File from Uri type android

I'm trying to select image from gallery then convert this image to File and send it via HttpPost but I'm getting always FileNotFoundException. This my Code : Selecting the photo public void onActivityResult(int requestCode, int resultCode, Intent…
Chlebta
  • 3,090
  • 15
  • 50
  • 99
5
votes
2 answers

Make a call synchronously with loopj Android Asynchronous Http Client

I'm trying to use setUseSynchronousMode on loopj to wait for results of http call before continuing in one case. I tried: AsyncHttpResponseHandler responseHandler = new AsyncHttpResponseHandler() { @Override public void…
Edwin Evans
  • 2,726
  • 5
  • 34
  • 47
4
votes
0 answers

Android Asynctask vs loopj vs volley which one is better

I want to know which one is better to use android asynctask vs loopj vs volley volley looks good but does not provide callbacks preexecute, onprogressupdate also how is loopj is it better than volley
amodkanthe
  • 4,345
  • 6
  • 36
  • 77
4
votes
0 answers

SSL Pinning with loopj in Android

I want to use my self-signed certificate in my Android app, instead of relying on Certificate Authorities. I've found this link (thoughcrime.org) with the reasons to do so, and some examples, but couldn't adapt it to my loopj scenario (I get no…
Lucas Jota
  • 1,863
  • 4
  • 24
  • 43
3
votes
1 answer

Loopj - Uploading Files with RequestParams c# .net

Trying to upload a file with params using loopj. im trying to get file from Request.Files and params from Request.Form["create"] but it is not uploading to the server. Android Post method try { String createTeamURL = "http://url";…
John Xam
  • 33
  • 2
1
2 3
15 16