Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to show progress bar when download file via Retrofit 2, Android

I'am currently using Retrofit 2 and i want to download some file from my server. Can i call back some event to catch percent complete download file to show in notification like this picture enter image description here

I reference that link, but it is upload, can i do it with same problem? Link

Is it possible to show progress when using retrofit 2 library?

like image 545
Nguyễn Hoàng Avatar asked Apr 26 '16 08:04

Nguyễn Hoàng


1 Answers

You can use ResponseBody and set it to OkHttp client and to update progress in UI you can use interface.check this link

like image 90
Godfather Avatar answered Oct 27 '22 00:10

Godfather