Android Question Wait For Http Job - activiry pause


Active Member
Licensed User
I am using okHttpUtils2 with wait for

I have 2 activities
I use wait for some http jobs in activity one. Before the jobs complete or done, user starts another activity.

My problem here is when the job completes in activity one, activity two is paused and activity one started.

I need to release or close or cancel all waiting jobs when the activity one is paused or closed.

Is there possibility to do it.


Licensed User
you should move the jobs to the starter service and raise an event in the calling activity when the job finishes and the activity is still running.
Upvote 0


Well-Known Member
Licensed User
or move the jobs into a class and use this class in a starter service :)
Upvote 0