0

I can download some file with retrofit library, its very simple. But i cannot find how to show progress of file download? In retrofit listener there are only two methods : onFailure and onResponse.

Alex D.
  • 1,424
  • 15
  • 40
  • if file downloading is started when you click on click on button then you open a progress dialog on button click.In onsuccess and onerror dismiss progress.Be sure to put all this code in handler. – Murali Aug 01 '16 at 12:55
  • I need to show percent progress. For example, 18% , 25%, 56%, 90% ... Not only circle progress. – Alex D. Aug 01 '16 at 12:57
  • http://stackoverflow.com/questions/9043683/how-to-show-progress-bar-status-by-percentage see this – Murali Aug 01 '16 at 12:57
  • I need to show progress, when downloading with RETROFIT library. In this link there no retrofit using – Alex D. Aug 01 '16 at 13:00
  • 2
    https://www.learn2crack.com/2016/05/downloading-file-using-retrofit.html – Alpha Aug 01 '16 at 13:02
  • consider above example. – Murali Aug 01 '16 at 13:02
  • 2
    Also please check this link: http://stackoverflow.com/questions/23348812/android-retrofit-onprogressupdate-for-showing-progress-notification – Alpha Aug 01 '16 at 13:04
  • thanks, its what i searched – Alex D. Aug 01 '16 at 13:07

1 Answers1

2

Here is exactly what you are looking for: https://www.learn2crack.com/2016/05/downloading-file-using-retrofit.html

You can use their way to calculate percent. Good luck!