Android Question Wait For Http Job - activiry pause

fasilosman

Active Member
Licensed User
Longtime 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.
 

DonManfred

Expert
Licensed User
Longtime 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

MarkusR

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