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

Call multiple JsonHttpResponseHandler but only one onFinish

I created a layout in my app where I have multiple checkboxes and once the user checked some and clicks ok, I search it via a jsonHttpResponse (each iteration is an item that was checked): for (int i = 0; i < items.size(); i++) { String itemID =…
Ben
  • 1,737
  • 2
  • 30
  • 61
0
votes
0 answers

Android Kotlin - loopj AsyncHttpClient not working with ssl / https on older APIs

val params = RequestParams() params.put("userid", prefs!!.getLong("userid", 0)) params.put("lastid", lastID) val client = AsyncHttpClient() client.post("$domain/xxx.php", params, object : JsonHttpResponseHandler() { override fun…
user12880465
0
votes
0 answers

Connection Timeout exception in com.loopj.android:android-async-http continuously

I'm using com.loopj.android:android-async-HTTP library for HTTP request. but sometimes response is coming but sometime not. when i switching internet to WiFi(jio hotspot) response is not coming and showing connect timeout exception. if i restart the…
Pritham Bnr
  • 839
  • 2
  • 9
  • 16
0
votes
1 answer

Return Http Response to the Main thread an start new activity (intent) using Loopj implementation

I am pretty new to Java programming. I am doing a Http Request with Async using the implementation Loopj (com.loopj.android:android-async-http:1.4.9). The OnSuccess and OnFailure of the AsyncHttpResponseHandler are working fine. New I want to return…
0
votes
0 answers

Android getting data from API so slow when using Mobile Data connection

based on my title. Right now I am using vps from DigitalOcean to deploy the API (using laravel). when I debug my apps, its really fast when getting data using WiFi. But, when I turn off the WiFi and turn on my data connection its really slow, almost…
0
votes
2 answers

Loop blocking asynchronous request from being beformed. Why and how to solve?

I define how to handle the response I receive from my server in an anonymous inner class, where I store the response in a Map to enable access from outside that inner class. Since my server call is asynchronous, I implemented a while-loop to wait…
Benjamin Batt
  • 33
  • 1
  • 6
0
votes
4 answers

How to return response to calling function? (Android-App calling Java REST-Server via JSON)

I'm rewriting some pieces of an Android App to call a REST-Server I've written in Java, using the Spring-Boot Framework. To summarize, let's say in the app, function A calls a function B in my MainController (which is supposed to manage the…
Benjamin Batt
  • 33
  • 1
  • 6
0
votes
1 answer

How can I run app in release mode using sms retriever api and upload to the google app store

I'm trying to test the app in release mode before uploading to Google Play Store but I'm getting an error like "E/AsyncHttpRequest: Unhandled exception origin cause java.lang.ClassCastException: $Proxy0 cannot be cast to d.a.a.a.k.h". If anyone…
Rohan
  • 96
  • 8
0
votes
2 answers

How to send current latitude and longitude data on localhost server in Json format in android using loopj concept?

In this code, I explain how to send data in json format to server. It uses "RequestParams" to send data to server and get response from server in json format in "JSONObject response". ///////Getting location first/////////// Location location; …
Rohan
  • 96
  • 8
0
votes
2 answers

Loopj AsyncHttpClient JsonHttpResponseHandler not getting a timeout exception

I am trying to connect to a server using following code. However I am not able to get a timeout even after switching off the server. I want to know where i am going wrong. However I do get call to onFinish function. But not being able to distinguish…
Mubeen
  • 11
  • 4
0
votes
1 answer

Loopj Put and Post with basic auth return null response with no error

This is an attempt to use Loopj for a Synchronous put and post call from a HTTP utility class. The code uses a syncrhonous client as it’s used inside an AsyncTask and some UI interactions depend heavily on the json response so the AsyncTask is…
0
votes
1 answer

Using get method from loopj library to receive data from git hub api v3

I'm using loopj to create a GET request to fetch data from GitHub API v3. However the status code 403 keeps returning in the callback and i've tried every possible solution i could think of. Here is the code im using, this method is called in a…
0
votes
1 answer

Loopj Post method failure - error while trying to send post JSON

I am working in an android application that has to send user email through post method. The api endpoint is at https://api-iddog.idwall.co/ when i already run some tests and was able to GET values from here. Im using Loopj Library. However, i've…
0
votes
0 answers

What Best Practice to Submit a Failed Request Again

My AsyncHttpClient class is as follows. ApiHttpClient.java package virtualsystems.com.br.financial.client; import android.content.Context; import android.util.Log; import com.loopj.android.http.AsyncHttpClient; import…
0
votes
1 answer

send data that contains "/" with URL in Android

I am using web-services to insert data to the MySQL database. I have a String data that contains a path of an image like https://i.imgur.com/fmccR.jpg. And I am using LoopJ libarary to perform this task. String pic =…
user9569492