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 Download Manager notification only shows up at the end #345

Open
Raigen opened this issue Apr 4, 2024 · 0 comments
Open

Android Download Manager notification only shows up at the end #345

Raigen opened this issue Apr 4, 2024 · 0 comments

Comments

@Raigen
Copy link

Raigen commented Apr 4, 2024

Hi! I am using this package to download certain files, mostly pdf, from the web onto our customers devices. On iOS I am using a combination of this package and react-native-share to save the file in the documents. On Android I am using the Download Manager settings so the files get stored in the default Downloads directory, as you would expect as an Android user. And it works quiet good so far.
The only issue I am facing on android is the download notification.

On my first file download the notification only appears when the file was successfully downloaded. So I can not show progress on the download from that notification.
If I keep the notification and download another file (or the same again) the new download is properly added to the Download Manager notification and I can see the progress of the download. So it seems to be working. Except on the first file that causes the notification to appear.

I tried different combinations of settings, but could not get it working.

React Native: 0.73.4
react-native-blob-util: 0.19.8

Example settings:

const configOptions = {
  addAndroidDownloads: {
    useDownloadManager: true,
    notification: true,
    mime: args.mimeType,
    storeInDownloads: true,
    title: args.fileName,
    mediaScannable: true,
  }
}

return await ReactNativeBlobUtil.config(configOptions).fetch('GET', args.url)
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

1 participant