Android Download Progress

后端 未结 1 1149
面向向阳花
面向向阳花 2020-12-24 03:44

I want to know the progress of some download.
When I\'m getting some resource from the internet, like this:

        String myFeed = request.getURI().toSt         


        
相关标签:
1条回答
  • 2020-12-24 04:04

    I think this has been answered here.

    In a nutshell: use the "Content-Length" which should be in the header fields.

    EDIT: sorry, I wasn't answering the question exactly. Basically once you know the expected total content length then you can keep track of how much data you have received and calculate the percentage complete.

    See also: How to create a download manager

    0 讨论(0)
提交回复
热议问题