I have a lot of subs launching downloads with OkHTTPUtils2, like this:
I don't have a global dim'med HttpJob, but I create a new one for every request.
My question is: how do I cancel all those downloads at once? I don't have a reference to them anymore as they are all individually dimmed inside subs.
Can I loop over all objects in memory somehow, look if they are of the type "httpjob" and cancel the downloads?
B4X:
Dim httpjob As HttpJob
httpjob.Initialize("getImage", Me)
httpjob.GetRequest.Timeout = 5000
httpjob.Download(fileURL)
I don't have a global dim'med HttpJob, but I create a new one for every request.
My question is: how do I cancel all those downloads at once? I don't have a reference to them anymore as they are all individually dimmed inside subs.
Can I loop over all objects in memory somehow, look if they are of the type "httpjob" and cancel the downloads?