Android Question HttpJob causing restarting paused activity

Brandsum

Well-Known Member
Licensed User
Hi,

I'm using OkHttpUtils2 for downloading some images.

Problem: If I close the activity by pressing back button when it still downloading an image, the activity starts again automatically.

Don't know what is happening!!!
Do anyone have any solution for this problem?
 

jahswant

Well-Known Member
Licensed User
Longtime User
It’s a normal behavior since the activity handles the jobDone event. An alternative would be to use a service to do the job in background !
 
Upvote 0
Top