What is the best way to capture the progress of file upload and download using Retrofit with kotlin
I have two different codes
1. I created a request extended class and performing update and getting callback in interface
2. I created extension function with request body and collecting it in flow by calculating the file size and content delivered
But in both cases I have to write a lot and I need one plug and play solution, by above i created a function and calling it from many places
Any recommendations?
Umar Ata
01/22/2022, 12:33 PM
The problem I am facing is that I am using it in coroutines and it is not like other api calls that returns exact type of response data class
Instead I need to collect the progress and update the view
Is there any better approach?