Registry / storage / react-native-background-downloader-queue

react-native-background-downloader-queue

JSON →
library5.3.3jsnpmunverified

A React Native library (v5.3.3) that manages a queue of file downloads, persisting state across app restarts and retrying failed downloads automatically. Works in the background even after the app is killed (iOS). Builds on three peer dependencies: @kesha-antonov/react-native-background-downloader for background downloading, react-native-fs for file system operations, and @react-native-async-storage/async-storage for queue persistence. The primary differentiator is automatic resume and reconciliation: it tracks a set of URLs, downloads them sequentially, and maps remote URLs to local cached paths. Supports wifi-only downloads and lazy deletion. Ships TypeScript definitions. Release cadence is irregular.

storage
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Default export only; ESM-style import with TypeScript supported.

import DownloadQueue from 'react-native-background-downloader-queue'

Create a download queue, initialize it, add a URL to download, and retrieve the local or remote path for use.

import DownloadQueue from 'react-native-background-downloader-queue'; const downloader = new DownloadQueue(); await downloader.init(); await downloader.addUrl('https://example.com/file.mp3'); const path = await downloader.getAvailableUrl('https://example.com/file.mp3'); console.log(path);
Debug
Known footguns
gotchaMust call init() before any other methods or queue operations will fail or be lost.
breakingiOS background downloads break if extra AppDelegate step is not performed.
deprecatedgetAvailableUrl returns local path if downloaded, else remote URL. Behavior changed in v4 to never return null.
gotchaUsing multiple domain instances with same AsyncStorage keys may cause queue state corruption.
gotchaDownloads are sequential; calling addUrl for multiple URLs queues them, does not start parallel downloads.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
23 hits · last 30 days
bytedance
4
gptbot
3
amazonbot
3
ahrefsbot
1
Resources