I'm trying to calculate the upload and download speed using the function startUploadRepeat and startDownloadRepeat and converting it from bits to mbps. However, when I run my application and try to calculate the two speeds, the numbers are super off? The upload speed is like 0.1 and the download speed is in the 100 range. I'm using report.getTransferRateBit() to get the rate and dividing it by 1,000,000 but the numbers are still extremely off. Can anyone help me with this? Here is my code:
Hello,
I'm trying to calculate the upload and download speed using the function
startUploadRepeat
andstartDownloadRepeat
and converting it from bits to mbps. However, when I run my application and try to calculate the two speeds, the numbers are super off? The upload speed is like 0.1 and the download speed is in the 100 range. I'm using report.getTransferRateBit() to get the rate and dividing it by 1,000,000 but the numbers are still extremely off. Can anyone help me with this? Here is my code:Also I'm putting all of this data in firebase, which is what the
uploadData()
function does. Any help will be greatly appreciated.