Maybe you should explain what are the differences between this library and Retrofit.
@bryant1410 Thanks for pointing out this.
I have updated the Readme.md file.
And do you have any performance comparison with Retrofit?
@bryant1410 : performance is same as both uses OkHttp but Android Networking gives some extra features.
You can give a performance test to probe that. And to pretend that people use your library.
@bryant1410 surely I will add that.
If you can create performance test comparing this library with Volley or Retrofit, it will be better i think. This library is looks promising with a lot of features in a single library, but of course as a developer we need to make our application is good in performance too. So we need to make sure the performance of each library we used.
@boyfox we will add the feature of merging two requests in the upcoming release.
My Code for simple get method is not working it is give me error
url="http://dev.efurtherance.com/rcis_school_new/webservice/system/all"
param=school_code
AndroidNetworking.get("http://dev.efurtherance.com/rcis_school_new/webservice/system/all")
.addQueryParameter("school_code", "RCISTHANE")
.setTag("test")
.setPriority(Priority.LOW)
.build()
.getAsJSONArray(new JSONArrayRequestListener() {
@Override
public void onResponse(JSONArray response) {
// do anything with response
Log.e("resp", String.valueOf(response));
}
@Override
public void onError(ANError error) {
// handle error
Log.e("resp", String.valueOf("error"));
}
});
/////////////////////////////////////////////////
And code for upload image file also not working it gives me connection error
url="http://dev.efurtherance.com/rcis_school_new/webservice/teacher/update"
params=profile_image(image file),action,reference;
AndroidNetworking.upload("http://dev.efurtherance.com/rcis_school_new/webservice/teacher/update")
.addMultipartFile("profile_image", new File(imgpath))
.addMultipartParameter("action", "updateprofileimage")
.addMultipartParameter("reference","T1038")
.setPriority(Priority.HIGH)
.build()
.setUploadProgressListener(new UploadProgressListener() {
@Override
public void onProgress(long bytesUploaded, long totalBytes) {
// do anything with progress
}
})
.getAsJSONObject(new JSONObjectRequestListener() {
@Override
public void onResponse(JSONObject response) {
// do anything with response
Log.e("resp", String.valueOf(response));
}
@Override
public void onError(ANError error) {
// handle error
Log.e("resp", String.valueOf("error"));
if (error.getErrorCode() != 0) {
// received error from server
// error.getErrorCode() - the error code from server
// error.getErrorBody() - the error body from server
// error.getErrorDetail() - just an error detail
Log.e("onError errorCode : ", String.valueOf(error.getErrorCode()));
Log.e("onError errorBody : ", String.valueOf(error.getErrorBody()));
Log.e("onError errorDetail : ", String.valueOf(error.getErrorDetail()));
// get parsed error object (If ApiError is your class)
} else {
// error.getErrorDetail() : connectionError, parseError, requestCancelledError
Log.e("onError errorDetail : ", String.valueOf(error.getErrorDetail()));
}
}
});
Most helpful comment
@bryant1410 surely I will add that.