Android Question Calculating size of bytes used ?

Yayou49

Active Member
Licensed User
Hi,

While consuming webservices (or else), how is it possible to know, for each call, the amount of bytes downloaded ?

I found a thread talking about this subject but the thread is 5 years old ....
Maybe some good news since ....

Many thanks in advance.
 

Yayou49

Active Member
Licensed User
In fact, some phone are limited while downloading from internet (according to provider rules).
So I need to calculate for my application, for each internet request (call to a webservice in my case), how many bytes are consummed (downloaded).
Is that clear enough ?
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
you can call your page with an extra parameter like &count=1 and the page does it's normal job but instead of returning that data it returns the size of that string.

notice that it won't be 100% correct as http request also have additional headers which eats away a few hundreds of bytes.
 
Upvote 0
Top