I want to implement pause and resume functionality for my xamarin.android and xamarin.ios apps. I have written a common class where using "WebClient". Basically, when the user clicks on the pause button I am cancelling the download.
I tried to use WebClient.DownloadFileAsync method but in this case, the previously downloaded file gets replaced with the new file after user resumes the download.
I tried to use WebClient.DownloadDataAsync method. In this case, I can open the file in append mode, but we don't get the bytes if the user cancels the download(pause the downloads).
I tried to use WebClient.OpenReadAsync method, but there is no callback method to get the percentage.
Please provide the solution or if we have any library for handling this.