Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android: GetUriForDownloadedFile(downloadedFile.Id) sometimes returns null #129

Open
2 of 6 tasks
janwiebe-jump opened this issue Jul 23, 2021 · 1 comment
Open
2 of 6 tasks

Comments

@janwiebe-jump
Copy link

Steps to reproduce

  1. Setup up the download manager for Android, and use the HandleDownloadFileStatusChanged event

  2. When the status becomes "completed", check for the uri of the downloaded file by calling:

var nativeDownloadManager = (Android.App.DownloadManager)context.GetSystemService(Context.DownloadService);
var source = nativeDownloadManager.GetUriForDownloadedFile(downloadedFile.Id);
  1. Sometimes the variable source is null

Expected behavior

Variable source should never be null

Actual behavior

According to our AppCenter logs source is sometimes null

Configuration

Platform:

  • iOS
  • Android
  • UWP
  • Other

Device:

  • Simulator
  • Real device (Xiaomi Mi 9t Pro, Android11, but lots of other devices as well, like Samsungs)
@SimonSimCity
Copy link
Owner

This is part of the native Android implementation - please take a look at the Android documentation. Maybe the sample I wrote there is outdated and there are better ways of accessing the file - haven't used this library in a while ...

Feel free to write a pull request or any additional information which might help others to pick up on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants