Questions tagged [android-async-http]

A Callback-Based Http Client Library for Android.

Overview

An asynchronous callback-based Http client for Android built on top of Apache’s HttpClient libraries. All requests are made outside of your app’s main UI thread, but any callback logic will be executed on the same thread as the callback was created using Android’s Handler message passing. You can also use it in Service or background thread, library will automatically recognize in which context is ran.

Features

  • Using upstream HttpClient of version 4.3.6 instead of Android provided DefaultHttpClient
  • Compatible with Android API 23 and higher
  • Make asynchronous HTTP requests, handle responses in anonymous callbacks
  • HTTP requests happen outside the UI thread
  • Requests use a threadpool to cap concurrent resource usage
  • GET/POST params builder (RequestParams)
  • Multipart file uploads with no additional third party libraries
  • Streamed JSON uploads with no additional libraries
  • Handling circular and relative redirects
  • Tiny size overhead to your application, only 90kb for everything
  • Automatic smart request retries optimized for spotty mobile connections
  • Automatic gzip response decoding support for super-fast requests
  • Binary protocol communication with BinaryHttpResponseHandler
  • Built-in response parsing into JSON with JsonHttpResponseHandler
  • Saving response directly into file with FileAsyncHttpResponseHandler
  • Persistent cookie store, saves cookies into your app’s SharedPreferences
  • Integration with Jackson JSON, Gson or other JSON (de)serializing libraries with BaseJsonHttpResponseHandler
  • Support for SAX parser with SaxAsyncHttpResponseHandler
  • Support for languages and content encodings, not just UTF-8

Library Link & More Information About Setup

Repo

loopj - James Smith

260 questions
-1
votes
2 answers

How can I get filleUploaded URL as string from async task in android

I am uploading an image on server by using async task and in the end I want to return value of uploaded file url. How can I do that I am calling asynctask as new Config.UploadFileToServer(loginUserInfoId, uploadedFileURL).execute(); and my…
Neeraj Mehta
  • 1,675
  • 2
  • 22
  • 45
-1
votes
2 answers

Throw Exception in onFailure of LoopJ AndroidAsyncHttp

Edited I have a custom Exception class MyException public class MyException extends RunTimeException{ public MyException() { super(); } public MyException(String message) { super(message); } public…
Muneeb Mirza
  • 810
  • 1
  • 17
  • 35
-1
votes
1 answer

An error occured while executing doInBackground(). FATAL EXCEPTION:AsyncTask #10

On the click event add data to MySQL database through php on the localhost. Its showing following logcat error on the click event. Please help me to solve this problem. 08-11 07:31:06.416: D/gralloc_goldfish(971): Emulator without GPU emulation…
-3
votes
1 answer

Overriding methods if not passed by argument

I'm using a library for android to do the HTTP communication between my app and my website. For the library, it allows you to create a static class which can then be called throughout the app. What happens when you call the static class methods,…
Matt Davis
  • 470
  • 5
  • 16
-4
votes
2 answers

Converting a JSON object to an equivalent in JAVA

I am massively stuck with converting a PHP server request into an equivalent Java Request. This is the code that contains the JSON object that I need to replicate in JAVA and send from an Android device: $(".unableprocess").click(function() { …
user1841702
  • 2,683
  • 6
  • 35
  • 53
1 2 3
17
18