I implemented the download functionality in my app, and now I want to update the app's UI with the download percentage. From the docs, I see that a content provider is to be used. I came accross this download content provider: https://android.googlesource.com/platform/packages/providers/DownloadProvider/+/445b908/src/com/android/providers/downloads/DownloadProvider.java But the issue is, Xamarin seems not to have it. So I wish to know if it is available in an external package. I tried implementing my own content provider as seen here, but its observer never gets called. Can someone please help ?
Asked
Active
Viewed 115 times
0
-
For now, i do not find the native example on official document. Please check the code in the link below. https://learn.microsoft.com/en-us/answers/questions/212514/how-to-check-download-manager-file-downloaded-and.html – Wendy Zang - MSFT Jul 21 '21 at 08:04
-
Hi, thanks but I've already implemented that part. My aim is to monitor the download progress in app, and not only be notified when download terminates. – Damien Doumer Jul 21 '21 at 10:30
-
Have you try the while loop for the percentage? Check the link below. https://stackoverflow.com/questions/49230339/showing-download-percentage-with-download-manager – Wendy Zang - MSFT Jul 22 '21 at 08:28
-
I have tried something better, that is; using xamarin forms' timer and it works better. But my aim is to find out why these providers and observers do not work. – Damien Doumer Jul 22 '21 at 10:27
-
Could you make sure the content change occurs? And when onChange do not sent which user have been changed, we need to check how to match it with your data. This post is too old. But it may help. https://stackoverflow.com/questions/19101814/get-trigger-from-contentobserver – Wendy Zang - MSFT Jul 28 '21 at 07:40