Android Question OkHttp cancel download

Pendrush

Well-Known Member
Licensed User
Longtime User
How can I cancel already started download, when HttpUtils2Service is Destroyed?
Or cancel download after some time, for example after 30 sec?
 
Last edited:

Pendrush

Well-Known Member
Licensed User
Longtime User
Request timeout is only for connection time out.
If, for example, we set timeout=10000, if there is no connection with server in next 10 seconds, jobdone success will be false, but if connection is successful in first 10 seconds, no matter how file is big, download will be continued until the file finish download.
I have different problem. File for download is about 500mb. I need some option for users so they can cancel download(s).
 
Upvote 0
Top