Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@capgo/capacitor-downloader

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capgo/capacitor-downloader

Download file in background or foreground

latest
Source
npmnpm
Version
7.0.6
Version published
Maintainers
1
Created
Source

@capgo/capacitor-downloader

Capgo - Instant updates for capacitor

Download file in background or foreground

WIP: the plugin is not yet ready for production

Install

npm install @capgo/capacitor-downloader
npx cap sync

API

download(...)

download(options: DownloadOptions) => Promise<DownloadTask>
ParamType
optionsDownloadOptions

Returns: Promise<DownloadTask>

pause(...)

pause(id: string) => Promise<void>
ParamType
idstring

resume(...)

resume(id: string) => Promise<void>
ParamType
idstring

stop(...)

stop(id: string) => Promise<void>
ParamType
idstring

checkStatus(...)

checkStatus(id: string) => Promise<DownloadTask>
ParamType
idstring

Returns: Promise<DownloadTask>

getFileInfo(...)

getFileInfo(path: string) => Promise<{ size: number; type: string; }>
ParamType
pathstring

Returns: Promise<{ size: number; type: string; }>

addListener('downloadProgress', ...)

addListener(eventName: 'downloadProgress', listenerFunc: (progress: { id: string; progress: number; }) => void) => Promise<PluginListenerHandle>
ParamType
eventName'downloadProgress'
listenerFunc(progress: { id: string; progress: number; }) => void

Returns: Promise<PluginListenerHandle>

addListener('downloadCompleted', ...)

addListener(eventName: 'downloadCompleted', listenerFunc: (result: { id: string; }) => void) => Promise<PluginListenerHandle>
ParamType
eventName'downloadCompleted'
listenerFunc(result: { id: string; }) => void

Returns: Promise<PluginListenerHandle>

addListener('downloadFailed', ...)

addListener(eventName: 'downloadFailed', listenerFunc: (error: { id: string; error: string; }) => void) => Promise<PluginListenerHandle>
ParamType
eventName'downloadFailed'
listenerFunc(error: { id: string; error: string; }) => void

Returns: Promise<PluginListenerHandle>

removeAllListeners()

removeAllListeners() => Promise<void>

Interfaces

DownloadTask

PropType
idstring
progressnumber
state'PENDING' | 'RUNNING' | 'PAUSED' | 'DONE' | 'ERROR'

DownloadOptions

PropType
idstring
urlstring
destinationstring
headers{ [key: string]: string; }
network'cellular' | 'wifi-only'
priority'high' | 'normal' | 'low'

PluginListenerHandle

PropType
remove() => Promise<void>

Credit

This plugin was inspired from: https://github.com/kesha-antonov/react-native-background-downloader

Keywords

capacitor

FAQs

Package last updated on 08 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts