Hi guys, I'm having some troubles doing some things and I need your help.
I have an Activity that have an instance of the SpiceManager() to be used in view pager fragments.
1 - The first problem is when I try to cancel a request, I call SpiceManager.cancel(RequestObject.class, Cache_KEY) and after that i call the getPendingRequestCount() and it returns 1 although I had cancelled the request before.
2 - The second problem is that I want that when the user tries to refresh the data, if there is other request pending, it will not call the service again and waits for the pending request response.
I added in the refreshFunction() a listener
addListenerIfPending(
ResponseObject.class, Cache_KEY
new PendingRequestListener());
in the PendingRequestListener I have a function:
public void onRequestNotFound() that calls the execute() function in case not having any pending requests.
The problem is that it enters always on that function even if I have made a request previously.
Thanks in advance for your help and congrats for the fantastic work you develop here.
--
Vous recevez ce message, car vous êtes abonné à un sujet dans le groupe Google Groupes "RoboSpice".
Pour vous désabonner de ce sujet, visitez le site https://groups.google.com/d/topic/robospice/VDkPX5XcQqE/unsubscribe.
Pour vous désabonner de ce groupe et de tous ses sujets, envoyez un e-mail à l'adresse robospice+...@googlegroups.com.
Pour obtenir davantage d'options, consultez la page https://groups.google.com/d/optout.