Android Question Cancel Httpjob

Facilauto Juan

Member
Licensed User
Longtime User
Hello there!

I have activity a and activity b.
I'm in activity a. I launch a httpjob request.
Before the httpjob response arrives, I end activity a and go to activity b.
The httpjob response arrives and its attached funtion is activity_a.function.
So, the httpjob response makes activity a to popup again, without user input.

How can I cancel all the httpjobs responses when I finish the activity that called the httpjob request?

Thanks in advance for the answers and your time.
 

Facilauto Juan

Member
Licensed User
Longtime User
Great.
Where do I make the httpjob request? in the activity? Or should I make a delayed call to a function in the service, and make the httpjob request from there?
 
Upvote 0

Facilauto Juan

Member
Licensed User
Longtime User
Thanks!
But now the app closes and the log says:
android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
 
Upvote 0
Top