Cancel request on Android

Hey,

under iOS there is a method to cancel an async request. As a callback “asyncRequestWasCanceled(request: ROAsyncRequest)” will be used. Under Android I can’t find such possibility to cancel a request. There the async request inherits from Thread and is not easy to cancel without any termination flag inside the class.

But perhaps I have overlooked something? Thanks!

Hello

Unfortunately there is no API to terminate an currently running async request.

Note that even on Cocoa, canceling a request, once sent, really just amounts to the client ignoring any response that comes back. There’s no way to actually tell the server “hey, don’t finish this”.

IOW, there’s little different between canceling or not canceling the request, as long as your completion handler know whether to do anything with the returned result or nor.