Parse-SDK-Android
Parse-SDK-Android copied to clipboard
ParseQuery.cancel() Delay in Cancellation
I have a "sort by" filter option within my app and upon the user selecting an option (such as sort by date, name, etc.), the app creates a ParseQuery that finds the sorted information in the Background with a Success Callback. The user can change the "sort by" selection at any time, meaning if the app experiences network issues multiple requests to parse will be sent. I tried to solve this by canceling any query requests currently active before creating a new one.
Only issue is that it takes about 30 seconds or more for any of the requested querys to be cancelled. Anything time less than this results in multiple requests showing success at once when the network reconnects, meaning the sort by option selected doesn't reflect what's currently selected.
Am I using ParseQuery.cancel() incorrectly or is their a way to get a callback when a query request is canceled so i know which information shouldn't be displayed to the user?
Thanks,