Christopher Christopher - 1 month ago 17
Java Question

Main progress for multiple upload progress (Android)

i have a problem to monitoring global progress of upload queue.

Here is my files


  1. foo.jpg [state : uploaded]

  2. bar.jpg [state : uploaded]

  3. obama.jpg [state : uploaded]

  4. michelle.jpg [state : 84%]

  5. hillary.jpg [state : pending]

  6. trump.jpg [state : pending]



normally, i used (uploaded * 100) / totalFilesQueue;

by the percentage increase while one upload ends.
is there a where to calculate the gloabal percent with 2 parameters ** SINGLE UPLOAD PROGRESS & GLOBAL PROGRESS [(uploaded * 100) / totalFilesQueue]??

Answer

( The sum of every SINGLE UPLOAD PROGRESS ) / totalFilesQueue * 100

Of course if the ( The add of every SINGLE UPLOAD PROGRESS ) is in base 100 and you want a result of decimal

Or Just ( The sum of every SINGLE UPLOAD PROGRESS ) / totalFilesQueue

Comments