Capacitor Plugin File Downloader

A simple Ionic file downloads native plug-in, which supports Android and ios。一个简单的ionic capacitor 文件下载 native 插件,支持android、ios
Alternatives To Capacitor Plugin File Downloader
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Youtube Music3,144
15 hours ago259mitJavaScript
YouTube Music Desktop App bundled with custom plugins (and built-in ad blocker / downloader)
Flutter_downloader81422119 days ago53May 26, 2022280bsd-3-clauseKotlin
Flutter Downloader - A plugin for creating and managing download tasks. Maintainer: @bartekpacia
Happypandax743
3 days ago85lgpl-3.0JavaScript
A cross-platform server and client application for managing and reading manga and doujinshi
Gradle Download Task60264113 days ago34May 04, 20224apache-2.0Java
📥 Adds a download task to Gradle that displays progress information
Fanficfare587
a day ago107June 01, 202227otherPython
FanFicFare is a tool for making eBooks from stories on fanfiction and other web sites.
Keepass Yet Another Favicon Downloader396
a year ago9mitC#
Yet Another Favicon Downloader for KeePass 2.x
Mangaripper159
2 years ago21mitC#
This software helps you download manga (Japanese Comic) from several websites for your offline viewing.
Mymanga66
5 years ago12gpl-3.0C#
Manga downloader and reader for Windows 7/8.1/10. Written in C# with a clean and simple WPF interface.
Cordova Plugin Apkupdater62
4 months ago24December 10, 2021mitJava
This plugin allows your Android app to download and install compressed updates without the Google Play Store.
Mindl44
6 years ago5December 21, 201611agpl-3.0Go
A downloader for various sites and services.
Alternatives To Capacitor Plugin File Downloader
Select To Compare


Alternative Project Comparisons
Readme

capacitor-plugin-file-downloader

file download for capacitor

中文 | English

android ios

一个简单的ionic capacitor 文件下载 native 插件,支持android、ios

安装

npm install capacitor-plugin-file-downloader
ionic capacitor sync

配置

Android配置方法:

在根目录下找到 android 目录 ,依次找到 android/src/main/java/**** (嵌套包名文件夹)/activities/MainActivity.java,修改:

......
import com.veluxa.plugins.FileDownloader;

public class MainActivity extends BridgeActivity {
    ......
    this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
        ......
        add(FileDownloader.class);
    }});
    ......
}

IOS配置方法: 无需配置

调用

在需要使用到插件的文件,添加:

......
import 'capacitor-plugin-file-downloader';
import { Plugins } from '@capacitor/core';
const { FileDownloader } = Plugins

......

FileDownloader.download({
    url: fileUrl, //下载地址
    filename: filename //包含后缀的文件名
}).then(doc => {
    //下载成功回调
    console.log(doc.path);
}).catch(e => {
    //下载失败回调
})
......

file download for capacitor

A simple ionic capacitor file download native plug-in, support android, ios

Install

npm install capacitor-plugin-file-downloader
ionic capacitor sync

Configuration

Android:

Find the android directory in the root directory, and then find android/src/main/java/**** (nested package name folder)/activities/MainActivity.java, Do the following changes:

......
import com.veluxa.plugins.FileDownloader;

public class MainActivity extends BridgeActivity {
    ......
    this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
        ......
        add(FileDownloader.class);
    }});
    ......
}

IOS: Don't need to configure

Use

In the files that need to use the plug-in:

......
import 'capacitor-plugin-file-downloader';
import { Plugins } from '@capacitor/core';
const { FileDownloader } = Plugins

......

FileDownloader.download({
    url: fileUrl, //download link
    filename: filename //The file name that contains the suffix
}).then(doc => {
    //success
    console.log(doc.path);
}).catch(e => {
    //error
})
......
Popular Plugin Projects
Popular Downloader Projects
Popular Libraries Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Java
Plugin
Downloader