{"id":42102117,"url":"https://github.com/Cap-go/capacitor-downloader","last_synced_at":"2026-02-05T13:00:51.271Z","repository":{"id":259302958,"uuid":"877532922","full_name":"Cap-go/capacitor-downloader","owner":"Cap-go","description":"Capacitor plugin to download file in background or foreground","archived":false,"fork":false,"pushed_at":"2026-02-04T02:26:03.000Z","size":907,"stargazers_count":4,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-04T13:55:08.385Z","etag":null,"topics":["capacitor","capacitor-plugin","plugin"],"latest_commit_sha":null,"homepage":"https://capgo.app","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cap-go.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":"Cap-go","patreon":null,"open_collective":"capgo","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2024-10-23T20:14:19.000Z","updated_at":"2026-02-04T02:21:22.000Z","dependencies_parsed_at":"2024-11-13T18:33:20.127Z","dependency_job_id":"91c555ee-f608-4f3d-bc24-f87894f58a02","html_url":"https://github.com/Cap-go/capacitor-downloader","commit_stats":{"total_commits":37,"total_committers":2,"mean_commits":18.5,"dds":0.2432432432432432,"last_synced_commit":"8c2b8ae886bef47439bfae684db5db4307b11f84"},"previous_names":["cap-go/capacitor-downloader"],"tags_count":62,"template":false,"template_full_name":null,"purl":"pkg:github/Cap-go/capacitor-downloader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-downloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-downloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-downloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-downloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cap-go","download_url":"https://codeload.github.com/Cap-go/capacitor-downloader/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-downloader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29122350,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T10:47:47.471Z","status":"ssl_error","status_checked_at":"2026-02-05T10:45:08.119Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["capacitor","capacitor-plugin","plugin"],"created_at":"2026-01-26T13:00:21.332Z","updated_at":"2026-02-05T13:00:51.262Z","avatar_url":"https://github.com/Cap-go.png","language":"Java","funding_links":["https://github.com/sponsors/Cap-go","https://opencollective.com/capgo"],"categories":["Capgo Capacitor Plugins","[Capgo plugins](https://capgo.app/)"],"sub_categories":["Storage \u0026 Files"],"readme":"# @capgo/capacitor-downloader\n \u003ca href=\"https://capgo.app/\"\u003e\u003cimg src='https://raw.githubusercontent.com/Cap-go/capgo/main/assets/capgo_banner.png' alt='Capgo - Instant updates for capacitor'/\u003e\u003c/a\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch2\u003e\u003ca href=\"https://capgo.app/?ref=plugin_downloader\"\u003e ➡️ Get Instant updates for your App with Capgo\u003c/a\u003e\u003c/h2\u003e\n  \u003ch2\u003e\u003ca href=\"https://capgo.app/consulting/?ref=plugin_downloader\"\u003e Missing a feature? We’ll build the plugin for you 💪\u003c/a\u003e\u003c/h2\u003e\n\u003c/div\u003e\n\n\nDownload file in background or foreground\n\n## Why Capacitor Downloader?\n\nA reliable **native file downloader** built for Capacitor apps that continues downloads even when your app is backgrounded or closed:\n\n- **Background downloads** - Downloads continue even when app is minimized, backgrounded, or closed (main advantage)\n- **Progress tracking** - Real-time progress updates during downloads\n- **Network control** - Choose between WiFi-only or cellular network downloads\n- **Custom headers** - Add authentication tokens and custom HTTP headers\n- **Resumable downloads** - Pause and resume downloads (platform dependent)\n- **Event listeners** - Monitor download progress, completion, and failures\n- **Large file support** - Handle multi-gigabyte files without memory issues\n- **Free and open source** - No paid services required\n\nPerfect for downloading large media files, offline content, app updates, and any scenario where downloads need to survive app lifecycle events.\n\n## Documentation\n\nThe most complete doc is available here: https://capgo.app/docs/plugins/downloader/\n\n## Compatibility\n\n| Plugin version | Capacitor compatibility | Maintained |\n| -------------- | ----------------------- | ---------- |\n| v8.\\*.\\*       | v8.\\*.\\*                | ✅          |\n| v7.\\*.\\*       | v7.\\*.\\*                | On demand   |\n| v6.\\*.\\*       | v6.\\*.\\*                | ❌          |\n| v5.\\*.\\*       | v5.\\*.\\*                | ❌          |\n\n\u003e **Note:** The major version of this plugin follows the major version of Capacitor. Use the version that matches your Capacitor installation (e.g., plugin v8 for Capacitor 8). Only the latest major version is actively maintained.\n\n## Install\n\n```bash\nnpm install @capgo/capacitor-downloader\nnpx cap sync\n```\n\n## API\n\n\u003cdocgen-index\u003e\n\n* [`download(...)`](#download)\n* [`pause(...)`](#pause)\n* [`resume(...)`](#resume)\n* [`stop(...)`](#stop)\n* [`checkStatus(...)`](#checkstatus)\n* [`getFileInfo(...)`](#getfileinfo)\n* [`addListener('downloadProgress', ...)`](#addlistenerdownloadprogress-)\n* [`addListener('downloadCompleted', ...)`](#addlistenerdownloadcompleted-)\n* [`addListener('downloadFailed', ...)`](#addlistenerdownloadfailed-)\n* [`removeAllListeners()`](#removealllisteners)\n* [`getPluginVersion()`](#getpluginversion)\n* [Interfaces](#interfaces)\n\n\u003c/docgen-index\u003e\n\n\u003cdocgen-api\u003e\n\u003c!--Update the source file JSDoc comments and rerun docgen to update the docs below--\u003e\n\nCapacitor plugin for downloading files with background support.\nProvides resumable downloads with progress tracking.\n\n### download(...)\n\n```typescript\ndownload(options: DownloadOptions) =\u003e Promise\u003cDownloadTask\u003e\n```\n\nStart a new download task.\n\n| Param         | Type                                                        | Description              |\n| ------------- | ----------------------------------------------------------- | ------------------------ |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#downloadoptions\"\u003eDownloadOptions\u003c/a\u003e\u003c/code\u003e | - Download configuration |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#downloadtask\"\u003eDownloadTask\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### pause(...)\n\n```typescript\npause(options: { id: string; }) =\u003e Promise\u003cvoid\u003e\n```\n\nPause an active download.\nDownload can be resumed later from the same position.\n\n| Param         | Type                         | Description                               |\n| ------------- | ---------------------------- | ----------------------------------------- |\n| **`options`** | \u003ccode\u003e{ id: string; }\u003c/code\u003e | - Options containing the download task ID |\n\n--------------------\n\n\n### resume(...)\n\n```typescript\nresume(options: { id: string; }) =\u003e Promise\u003cvoid\u003e\n```\n\nResume a paused download.\nContinues from where it was paused.\n\n| Param         | Type                         | Description                               |\n| ------------- | ---------------------------- | ----------------------------------------- |\n| **`options`** | \u003ccode\u003e{ id: string; }\u003c/code\u003e | - Options containing the download task ID |\n\n--------------------\n\n\n### stop(...)\n\n```typescript\nstop(options: { id: string; }) =\u003e Promise\u003cvoid\u003e\n```\n\nStop and cancel a download permanently.\nDownloaded data will be deleted.\n\n| Param         | Type                         | Description                               |\n| ------------- | ---------------------------- | ----------------------------------------- |\n| **`options`** | \u003ccode\u003e{ id: string; }\u003c/code\u003e | - Options containing the download task ID |\n\n--------------------\n\n\n### checkStatus(...)\n\n```typescript\ncheckStatus(options: { id: string; }) =\u003e Promise\u003cDownloadTask\u003e\n```\n\nCheck the current status of a download.\n\n| Param         | Type                         | Description                               |\n| ------------- | ---------------------------- | ----------------------------------------- |\n| **`options`** | \u003ccode\u003e{ id: string; }\u003c/code\u003e | - Options containing the download task ID |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#downloadtask\"\u003eDownloadTask\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### getFileInfo(...)\n\n```typescript\ngetFileInfo(options: { path: string; }) =\u003e Promise\u003c{ size: number; type: string; }\u003e\n```\n\nGet information about a downloaded file.\n\n| Param         | Type                           | Description                        |\n| ------------- | ------------------------------ | ---------------------------------- |\n| **`options`** | \u003ccode\u003e{ path: string; }\u003c/code\u003e | - Options containing the file path |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;{ size: number; type: string; }\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### addListener('downloadProgress', ...)\n\n```typescript\naddListener(eventName: 'downloadProgress', listenerFunc: (progress: { id: string; progress: number; }) =\u003e void) =\u003e Promise\u003cPluginListenerHandle\u003e\n```\n\nListen for download progress updates.\nFired periodically as download progresses.\n\n| Param              | Type                                                                  | Description                           |\n| ------------------ | --------------------------------------------------------------------- | ------------------------------------- |\n| **`eventName`**    | \u003ccode\u003e'downloadProgress'\u003c/code\u003e                                       | - Must be 'downloadProgress'          |\n| **`listenerFunc`** | \u003ccode\u003e(progress: { id: string; progress: number; }) =\u0026gt; void\u003c/code\u003e | - Callback receiving progress updates |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#pluginlistenerhandle\"\u003ePluginListenerHandle\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### addListener('downloadCompleted', ...)\n\n```typescript\naddListener(eventName: 'downloadCompleted', listenerFunc: (result: { id: string; }) =\u003e void) =\u003e Promise\u003cPluginListenerHandle\u003e\n```\n\nListen for download completion.\nFired when a download finishes successfully.\n\n| Param              | Type                                              | Description                                  |\n| ------------------ | ------------------------------------------------- | -------------------------------------------- |\n| **`eventName`**    | \u003ccode\u003e'downloadCompleted'\u003c/code\u003e                  | - Must be 'downloadCompleted'                |\n| **`listenerFunc`** | \u003ccode\u003e(result: { id: string; }) =\u0026gt; void\u003c/code\u003e | - Callback receiving completion notification |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#pluginlistenerhandle\"\u003ePluginListenerHandle\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### addListener('downloadFailed', ...)\n\n```typescript\naddListener(eventName: 'downloadFailed', listenerFunc: (error: { id: string; error: string; }) =\u003e void) =\u003e Promise\u003cPluginListenerHandle\u003e\n```\n\nListen for download failures.\nFired when a download encounters an error.\n\n| Param              | Type                                                            | Description                            |\n| ------------------ | --------------------------------------------------------------- | -------------------------------------- |\n| **`eventName`**    | \u003ccode\u003e'downloadFailed'\u003c/code\u003e                                   | - Must be 'downloadFailed'             |\n| **`listenerFunc`** | \u003ccode\u003e(error: { id: string; error: string; }) =\u0026gt; void\u003c/code\u003e | - Callback receiving error information |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#pluginlistenerhandle\"\u003ePluginListenerHandle\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### removeAllListeners()\n\n```typescript\nremoveAllListeners() =\u003e Promise\u003cvoid\u003e\n```\n\nRemove all event listeners.\nCleanup method to prevent memory leaks.\n\n--------------------\n\n\n### getPluginVersion()\n\n```typescript\ngetPluginVersion() =\u003e Promise\u003c{ version: string; }\u003e\n```\n\nGet the plugin version number.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;{ version: string; }\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### Interfaces\n\n\n#### DownloadTask\n\nRepresents the current state and progress of a download task.\n\n| Prop           | Type                                                                 | Description                             |\n| -------------- | -------------------------------------------------------------------- | --------------------------------------- |\n| **`id`**       | \u003ccode\u003estring\u003c/code\u003e                                                  | Unique identifier for the download task |\n| **`progress`** | \u003ccode\u003enumber\u003c/code\u003e                                                  | Download progress from 0 to 100         |\n| **`state`**    | \u003ccode\u003e'PENDING' \\| 'RUNNING' \\| 'PAUSED' \\| 'DONE' \\| 'ERROR'\u003c/code\u003e | Current state of the download           |\n\n\n#### DownloadOptions\n\nConfiguration options for starting a download.\n\n| Prop              | Type                                     | Description                                      |\n| ----------------- | ---------------------------------------- | ------------------------------------------------ |\n| **`id`**          | \u003ccode\u003estring\u003c/code\u003e                      | Unique identifier for this download task         |\n| **`url`**         | \u003ccode\u003estring\u003c/code\u003e                      | URL of the file to download                      |\n| **`destination`** | \u003ccode\u003estring\u003c/code\u003e                      | Local file path where the download will be saved |\n| **`headers`**     | \u003ccode\u003e{ [key: string]: string; }\u003c/code\u003e  | Optional HTTP headers to include in the request  |\n| **`network`**     | \u003ccode\u003e'cellular' \\| 'wifi-only'\u003c/code\u003e   | Network type requirement for download            |\n| **`priority`**    | \u003ccode\u003e'high' \\| 'normal' \\| 'low'\u003c/code\u003e | Download priority level                          |\n\n\n#### PluginListenerHandle\n\n| Prop         | Type                                      |\n| ------------ | ----------------------------------------- |\n| **`remove`** | \u003ccode\u003e() =\u0026gt; Promise\u0026lt;void\u0026gt;\u003c/code\u003e |\n\n\u003c/docgen-api\u003e\n\n### Credit\n\nThis plugin was inspired from: https://github.com/kesha-antonov/react-native-background-downloader\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCap-go%2Fcapacitor-downloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCap-go%2Fcapacitor-downloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCap-go%2Fcapacitor-downloader/lists"}