Firebase upload manager return only 0 to 100 % while uploading file. Many users of stackoverflow said,
But i want smooth 0,1,2,3,...100% of uploading task, is it possible ,if yes please explain.
filepath.putFile(sendingImageURI).addOnProgressListener(new OnProgressListener<UploadTask.TaskSnapshot>() {
@Override
public void onProgress(UploadTask.TaskSnapshot taskSnapshot)
{
double progress = ((100.0 * taskSnapshot.getBytesTransferred()) / taskSnapshot.getTotalByteCount())/100;
Progressbar.setProgress((int) progress);
progressText.setText(String.valueOf(progress));
Log.i("progress",String.valueOf(progress));//this print 0 and 100 only
}
});

It sounds like you already have your answer: "it happens only when file size<256 kb(very small size)". The SDK is only going to invoke your callback for larger increments of uploaded bytes. There is no way to control this programmatically, unless you build your own version of the SDK using code from GitHub that works the way you want. You can always file a feature request if you would like different behavior.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With