259 questions
0
votes
1
answer
86
views
android.os.NetworkOnMainThreadException exception while trying to call a webservice from my android Services?
I have a scenario where I need to call the Webservices from the Android Services.
Currently I am starting the Services from the Activity by
Intent mServiceIntent = new Intent(this, AServices.class);
...
0
votes
1
answer
418
views
Post request returns empty response body Android?
I'm using android-async-http for rest request. When I doing post request then the response body is empty. When I use postman for the same request I received a response as JSONObject.
AsyncHttpClient ...
0
votes
2
answers
2k
views
AsyncHttpClient failed to connect to post URL on android 9
I am getting some strange problem with SyncHttpClient library. It is working fine on device below android 9 but my code unable to make a rest call to URL.
Here is my sample code:
import com.loopj....
1
vote
3
answers
744
views
Why AsyncTask can't implement methods except doInBackground?
In Android Studio, I've tried to implement the methods interface of AsyncTask, but it only shows method doInBackgound(). I've tried to place the cursor on the AsyncTask and then press Alt+Enter, but ...
3
votes
0
answers
164
views
AsyncHttpClient usage inside listener functions (and reuse of these functions)
I'm using the AsynHttpClient from LoopJ for my Android/Java app.
After first block of commands, I do login call to the server. If it's ok, I call other APIs to retrieve data.
For now, I'm calling ...
1
vote
2
answers
400
views
AsyncHttpClient is not calling my POST API
I'm new to Android, I'm using AsyncHttpClient to call a POST API. But the API is not even being called
Below is my code:
AsyncHttpClient client = new AsyncHttpClient();
...
0
votes
1
answer
1k
views
How to send data back to Android app from django rest framework using asynchttp?
Model.py
class Server(models.Model):
label = models.TextField(max_length=200,null=True) #compare this
upload1 = models.FileField(null=True, blank=True)
Image1 = models.TextField(upload1, null=...
0
votes
3
answers
1k
views
Program type already present: com.loopj.android.http.AsyncHttpClient$3
I am trying to build an app, but it failed compiling. I've tried to clean project, and when I tried to rebuild project, the same error appear.
I got this error from logcat:
Program type already ...
0
votes
0
answers
156
views
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....
1
vote
1
answer
147
views
How to parse this JSONObject to get value inside the array from the twitter search API to obtain each tweets(name, body)?
Here is the response I get when I use search/tweets.api.
{"statuses":[{"created_at":"Sun Jul 29 01:30:52 +0000 2018","id":1023380303648354304,"id_str":"1023380303648354304","text":"RT @...
0
votes
1
answer
48
views
Performance improvement - Parallelly executing the GET statements
In my Android App, I am executing the URL for n number of times. The program loads quick when there is a less number of items in the arraylist "prefCoinList". It actually takes lot of time when the ...
6
votes
2
answers
5k
views
IllegalStateException when trying to show dialog fragment
I get IllegalStateException on Google-Play Console which I can not reproduce and I don't understand what is the issue.
Here is the log from Google-Play Console
java.lang.RuntimeException:
at ...
1
vote
2
answers
3k
views
Retrofit - Passing POST parameter data and headers
I'm trying to call the Kraken API using retrofit. I have a working AsyncHttpClient version I want to convert to a retrofit version and I have some problem with passing POST parameters.
As stated in ...
0
votes
1
answer
631
views
AsyncHttpClient does not use provided proxy data
I've written a query tool which at it's heart uses this block to gather info from an external url:
AsyncHttpClientConfig proxiedCF = new DefaultAsyncHttpClientConfig.Builder().setUserAgent(...
0
votes
1
answer
49
views
Running Async in a fragment is not even being ran
I am running the commands like so:
new GetGameScoresFromFuhantikAPI()
And my method for this is ->
private class GetGameScoresFromFuhantikAPI extends AsyncTask<Void, Void, Void> {
@...
-1
votes
2
answers
154
views
Sending ArrayList to server not working with AsyncHttp
HttpAsyncRequest request = new HttpAsyncRequest(
MapsActivity.this,
Constant.BaseUrl,
HttpAsyncRequest....
2
votes
1
answer
3k
views
How to upload file from Android to node.js server
I am trying to send a file over http from android application to node.js server.
However, when I receive the file it's size is 0 bytes,
although i can read the file's original name.
Do you have any ...
3
votes
1
answer
340
views
how to secure api call from proxy
I am working on some app which as API call. while i add proxy in mobile and see response in web debugging tools. I can see my api call parameters and response too.
while in others app I cant see this ...
0
votes
1
answer
1k
views
Android studio does not allow to connect my application to internet
Hey I'm doing a web service login to my app, I've tried to connect to the internet, but it fails.
I've used httpurl connection and at the time of execute openConnection() and getresponseCode() it ...
2
votes
2
answers
596
views
How to ensure file upload works with video using loopj AndroidAsyncHttp?
I am trying to upload a video file to my server from my android app using loopj AndroidAsyncHttp library. Uploading an image gives a "Success: 200" response whereas attempting to upload a video give ...
0
votes
0
answers
534
views
Android 4.2.2 device can't connect to server
I am developing an Android app. The http requests are working fine with most devices, but a user with an Android 4.2.2 device can't connect to the server. What goes wrong?
0
votes
1
answer
2k
views
Android / Loopj - How can i POST a complex JSON object to a server?
In one of my application, in which I use the Loopj library, I need to send a complex object to a web-service (running on PHP). I decided to send a JSON object via HTTP POST request using Loppj example....
1
vote
2
answers
2k
views
handle timeout exception in loopj
I am having error in handling the timeout exception in asynchttpclient
@Override
public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {
...
1
vote
2
answers
2k
views
How to send parameters as Form parametrers instead of URL parameters with AsyncHttpClient in Android?
Currently I am creating parameters with:
RequestParams params = new RequestParams();
params.put("Param1","Value1");
And then posting like this:
AsyncHttpClient client = new AsyncHttpClient();
client....
2
votes
1
answer
562
views
picking file for async-http file upload (uri to file path)
I know my problem has been tackled multiple times already, but I couldn't find anything that would help me with my specific problem.
I have an intent to pick a file anywhere from the system:
private ...
0
votes
1
answer
562
views
Implement Basic HttpClient Post with Loopj on Android
I am new to Android programming and am having some difficulty implementing a basic version of a message sender using the Loopj library.
Here is my code:
package com.test.app;
import android.support....
0
votes
0
answers
372
views
Android - asynchttpclient send back resul from onSuccess or onFailure
Hy!
I want to make some http calls to a restserver from my android client. I created a class for rest calls.
I followed the http://loopj.com/android-async-http/ description:
My question is that how ...
0
votes
1
answer
1k
views
How to create context when sending json content?
Reading this question : POSTing JSON/XML using android-async-http (loopj) in order to post json where is the context value set ?
The accepted answer uses a context value as a parameter within post ...
0
votes
2
answers
969
views
Fatal signal 11 (SIGSEGV), code 1, fault addr 0xc0 in tid 20706 when trying to draw bitmap on the canvas
I am trying to draw a bitmap image on the canvas. But when doing so, I'm getting the below specified exception.
10-10 11:29:18.592: A/libc(20706): Fatal signal 11 (SIGSEGV), code 1, fault addr 0xc0 ...
0
votes
0
answers
277
views
VerifyError of sub-classing while new loopj/AsyncHttpClient in Samsung Note3/Android 5.0
I'm encountering a problem of loopj/android-async-http while I'm upgrading the android build configuration and android-async-http to support Android 6.0.
Not sure if a problem of loopj/android-async-...
0
votes
1
answer
322
views
Can I find HTML tags using AsyncHttpResponseHandler or AsyncHttpClient classes?
I am writing a webcrawler in Android. My code is
public void parseHttp() {
AsyncHttpClient client = new AsyncHttpClient();
String url = "http://stackoverflow.com/questions/38959381/...
0
votes
0
answers
57
views
AndroidAsyncHttp post data with 4 parameter in header and 10 in body
Hello all I want to use AndroidAsyncHttp for posting data to server.
for that i have 4 Parameters in header and 10 in body request i have done the following code but not working and getting null ...
1
vote
0
answers
2k
views
Single AsyncHttpClient instance ConnectTimeoutException
I use android-async-http in my project, and AsyncHttpClient static single instance, my code as follow step:
HttpURLConnection http request;
In first request success callback, use AsyncHttpClient to ...
0
votes
1
answer
3k
views
how to upload image file and json with Loopj AsyncHttpClient?
i want upload to Spring server @RequestBody
json and multipart-file(imgaefile) at ones.
how do i do?
Thanks for help.
0
votes
2
answers
219
views
How to send data in json format using AndroidAsyncHttp
I am trying to send data via post method of AsyncHttpClient in json format to server, server accept this format
{
email : '[email protected]'
password:'xxxxxx'
'username:'John Doe'
'lastname:'john'...
0
votes
1
answer
141
views
How to post JSON
I want to POST JSON in the following format and GET response.
Mentioned JSON:
{
"success": true,
"data": {
"id": "234576"
"name": "string"
}
}
1
vote
0
answers
838
views
AndroidAsync how to create SSL Client in websocket connection?
I have a problem. How to create SSL websocket client with self signed.
mServer = new AsyncHttpServer();
mServer.websocket("/get", new AsyncHttpServer.WebSocketRequestCallback() {
@Override
...
1
vote
2
answers
2k
views
How do I get the value of a string variable from a JSONParser class?
I have a log-in web API which returns true if you have successfully logged-in and false otherwise.
Now I want to get that returned value which is why I have made used of this PostAsync Class calling ...
0
votes
1
answer
888
views
Android async-http - java.security.cert.CertPathValidatorException: Trust anchor for certification path not found
I using async-http library and when our server started using https, I got this error:
java.security.cert.CertPathValidatorException: Trust anchor for certification path not found
How can I turn on ...
0
votes
1
answer
644
views
Update a recyclerView in another activity from async thread of other activity
I have two activity A and B.
In activity A I have a AsyncHttpClient fetching some data from a website. Once the data is received, I refresh the RecyclerView in activity A. But while the data is being ...
0
votes
1
answer
1k
views
Asynchronous requests to server posted in a loop - Android
I am a Java developer with no Android experience, and I am trying to quickly put an app together. It seems that what I would normally do in Java isn't helping.
At this stage, ease of implementation ...
1
vote
0
answers
61
views
AsyncHttp not working in Android Studio
So i'm working on JSON,and i have an URL to get the JSON,but for some reason it says
Connect to static-182-18-161-240.ctrls.in/218.93.250.18:7070 timed out
public class MainActivity extends ...
1
vote
2
answers
534
views
(Android | Java) AndroidAsyncHttp (Loopj) to complete web request before proceeding thread
I'm currently requesting an JsonObject via AsyncHttpClient (loopj) web request, however the request is rather slow and I need the Object to proceed. Currently the program crashes as the object being ...
2
votes
0
answers
366
views
Getting "javax.net.ssl.SSLHandshakeException: Connection closed by peer" when tried with https request from android app using loopj
I am using google app engine as backend, and had proper ssl certificates installed/added and DNS mapping is done by CNAME configurations. Everything is working fine expect in android app.
Throwing "...
0
votes
2
answers
554
views
Populate spinner android and Asynchronous-Http-Client
I am new to LoopJ Android Asynchronous-Http-Client.I figured out how to GET the data from the database with my PHP web service.
My ServiceHandler :
public class ServiceHandler {
private static ...
1
vote
1
answer
488
views
Multiple Image/Pie Chart Updating
This should prove to be a very useful example for anyone reading this thread. I am trying to create an Async task which will take some existing place holding pictures in an ImageView and replace them ...
0
votes
1
answer
757
views
Upload multiple files from async http android but the success callback never gets received
I have tried the following link:
https://stackoverflow.com/a/35465318/787399
But I never receive onSuccess callback.
More: when I upload more than one file [images], then only one file gets ...
1
vote
2
answers
385
views
Sending files with AndroidAsyncHttp library
I'm trying to send a file via Android Async Http (android-async-http:1.4.9) library, the request i'm trying to make in fiddler looks like this:
Header:
Content-Type: multipart/form-data; boundary=-...
0
votes
0
answers
344
views
why AsyncHttpClient method calls both onSuccess and onFailure method simultaneously
I don't understand why both the methods are called simultaneously ie onSuccess and onFailure method of AsyncHttpClient. Here is the following code snippet.
AsyncHttpClient client = new ...
0
votes
1
answer
555
views
Upload of Large File Using AndroidAsyncHttp Fails after sometime from android
I am trying to upload a file using AsyncHttpClient.Below is the code :
public class uploadVideoAsyncTask extends AsyncTask<String,Void,JSONObject>{
Context context;
SyncHttpClient ...