@capgo/capacitor-downloader 8.3.8 → 8.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -1,13 +1,27 @@
|
|
|
1
1
|
# @capgo/capacitor-downloader
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Download large files in the background or foreground from your Capacitor app, with pause, resume and progress events. Downloads keep going when users leave the screen.
|
|
4
|
+
|
|
5
|
+
<a href="https://capgo.app/?ref=plugin_downloader"><img src="https://capgo.app/readme-banner.svg?repo=Cap-go/capacitor-downloader" alt="Capgo - Instant updates for Capacitor" /></a>
|
|
3
6
|
|
|
4
7
|
<div align="center">
|
|
5
|
-
<
|
|
6
|
-
<h2><a href="https://capgo.app/
|
|
8
|
+
<p><b>Capgo</b>: open-source live updates for Ionic and Capacitor apps. Ship OTA fixes and features instantly, without waiting for app store review.</p>
|
|
9
|
+
<h2><a href="https://capgo.app/register/?ref=plugin_downloader">➡️ Get started for free</a></h2>
|
|
10
|
+
<p>14-day unlimited free trial. No credit card required</p>
|
|
11
|
+
<p><a href="https://capgo.app/consulting/?ref=plugin_downloader">Missing a feature? We'll build the plugin for you 💪</a></p>
|
|
7
12
|
</div>
|
|
8
13
|
|
|
14
|
+
<p align="center">
|
|
15
|
+
<img src="https://raw.githubusercontent.com/Cap-go/capacitor-downloader/main/assets/github-social-preview.png" alt="@capgo/capacitor-downloader for Capacitor apps" width="300" />
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
## Key features
|
|
9
19
|
|
|
10
|
-
|
|
20
|
+
- **Downloads**: `download()` starts a task with optional HTTP headers and a `wifi-only` or cellular network rule.
|
|
21
|
+
- **Control**: `pause()`, `resume()` and `stop()` for each download ID.
|
|
22
|
+
- **Progress events**: `downloadProgress`, `downloadCompleted` and `downloadFailed` listeners.
|
|
23
|
+
- **Status and files**: `checkStatus()` for a task and `getFileInfo()` for a downloaded file.
|
|
24
|
+
- **Platforms**: iOS and Android. iOS uses a background `URLSession`, Android uses `DownloadManager`. Not available on web.
|
|
11
25
|
|
|
12
26
|
## Why Capacitor Downloader?
|
|
13
27
|
|
package/android/src/main/java/ee/forgr/capacitor/plugin/downloader/CapacitorDownloaderPlugin.java
CHANGED
|
@@ -27,7 +27,7 @@ import java.util.concurrent.atomic.AtomicLong;
|
|
|
27
27
|
@CapacitorPlugin(name = "CapacitorDownloader")
|
|
28
28
|
public class CapacitorDownloaderPlugin extends Plugin {
|
|
29
29
|
|
|
30
|
-
private final String pluginVersion = "8.3.
|
|
30
|
+
private final String pluginVersion = "8.3.11";
|
|
31
31
|
|
|
32
32
|
private DownloadManager downloadManager;
|
|
33
33
|
private final Map<String, Long> downloads = new ConcurrentHashMap<>();
|
|
@@ -8,7 +8,7 @@ import Capacitor
|
|
|
8
8
|
|
|
9
9
|
@objc(CapacitorDownloaderPlugin)
|
|
10
10
|
public class CapacitorDownloaderPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
11
|
-
private let pluginVersion: String = "8.3.
|
|
11
|
+
private let pluginVersion: String = "8.3.11"
|
|
12
12
|
public let identifier = "CapacitorDownloaderPlugin"
|
|
13
13
|
public let jsName = "CapacitorDownloader"
|
|
14
14
|
public let pluginMethods: [CAPPluginMethod] = [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/capacitor-downloader",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.11",
|
|
4
4
|
"description": "Download file in background or foreground",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@ionic/eslint-config": "^0.5.0",
|
|
66
66
|
"@ionic/prettier-config": "^4.0.0",
|
|
67
67
|
"@ionic/swiftlint-config": "^2.0.0",
|
|
68
|
-
"@types/node": "^
|
|
68
|
+
"@types/node": "^26.0.0",
|
|
69
69
|
"eslint": "^10.0.0",
|
|
70
70
|
"husky": "^9.1.7",
|
|
71
71
|
"prettier": "^3.6.2",
|