Hello,
I'm using HttpJob and HttpUtils2Service to fetch image from a URL, and the file is quite big, so it takes time. The problem is, if the user navigate away from the activity when the HTTP job is not finished yet, it can suddenly navigate back to the activity that has unfinished HTTP job when the previous job is finished.
Is there any way to stop the job when the user navigates away from the activity?
Thanks
I'm using HttpJob and HttpUtils2Service to fetch image from a URL, and the file is quite big, so it takes time. The problem is, if the user navigate away from the activity when the HTTP job is not finished yet, it can suddenly navigate back to the activity that has unfinished HTTP job when the previous job is finished.
Is there any way to stop the job when the user navigates away from the activity?
Thanks