0

I have an Android application that makes some requests on the server and also for sending data via web service, using the Volley library.

The data sent by the application are received by an API, and when there is confirmation, the API returns a specific value.

My problem is that I'm not getting this specific return from the API. How do I get this return, not only the server response 200 return that is received by library default?

  • Possible duplicate of [How to send a POST request using volley with string body?](https://stackoverflow.com/questions/33573803/how-to-send-a-post-request-using-volley-with-string-body) – Wasim K. Memon Jul 12 '17 at 14:29
  • Refer to this https://stackoverflow.com/a/33234027/6828464 – FerDensetsu Jul 12 '17 at 15:13

1 Answers1

0

You need to override parseNetworkResponse(NetworkResponse response)

Exemple :

@Override
protected Response<Bitmap> parseNetworkResponse(NetworkResponse response) {
    // Serialize all decode on a global lock to reduce concurrent heap usage.
        try {
            return doParse(response); //your parser function 
        } catch (OutOfMemoryError e) {
            //..Catch
        }

}

Take a look to the doc.

Hope it helps,

hamdalaye
  • 107
  • 1
  • 12