-
Notifications
You must be signed in to change notification settings - Fork 754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Volley 1.2.0 listener calls multiple times #409
Comments
RequestEventListener is for listening to various events over the course of executing a request. It's intended for debugging/logging purposes rather than meant to be what you actually use to listen to responses for a particular API call. Why are you using this interface, as opposed to passing in a listener to the Request constructor (which would only be invoked once - unless the request is using soft caching)? |
Thank you for the reply. But I am not satisfied with the answer. There is no proper or simple example of this version library (1.2.0) available anywhere to understand what are the changes and how to use them.
and
Now, where to collect the response? |
There is documentation and a simple example of how to make requests at https://developer.android.com/training/volley. Nothing significant has changed in version 1.2.0 regarding how to use the library for basic requests compared to older versions. The first callback you mentioned is the one provided by the code making the request. That would typically be where you'd act on the results, or pass the results to an interested Activity/Fragment. The second is only needed when you're implementing a custom subclass of Request - see https://developer.android.com/training/volley/request-custom#deliverresponse. I'm going ahead and closing this out as this seems more like a question of how to use the library than an issue report. If you have further questions about how to use the library, I'd recommend using a general help forum like our user group at volley-users@googlegroups.com, or a site like StackOverflow. We do have an open bug (#395) to flesh out the docs a bit further and hopefully make them more useful. |
I used volley 1.2.0 and found that for one get api call, there is a listener which gets called multiple time and dont know why.
please help me to clear this.
(BTW i dont remove that listener anywhere in my code. So adding same listener multiple times may create problems.
NetworkGetCall is just a class to call volley get method.
)
The text was updated successfully, but these errors were encountered: