Giter Club home page Giter Club logo

easy_downloader's Introduction

Fast download manager allow download in multiple isolate, file is split to multiple segments and download each segment using different connections.

Features

  • Support resume, pause, download
  • Support queue download
  • Download with multiple connections in multiple isolate with progress
  • Support notification
  • Support open file after download (only android and ios)

easy_dowloader

Getting started

add easy_downloader into your pubspec.yaml.

dependencies:
  easy_downloader: ^0.0.16

activate easy_downloader

dart pub global activate easy_downloader

Usage

  1. Initialize the plugin

Flutter

add easy_downloader_flutter_lib into your pubspec.yaml.

await EasyDownloader().initFlutter(
      allowNotification: true,
      //notification icon present in android/res/drawable
      defaultIconAndroid: 'download',
  );

Dart

  EasyDownloader().init();
  1. Create new task
var url = "https://github.com/linkkader/zanime/releases/download/39/zanime_39.apk";
var name = "test10MB$i";
var path = (await getApplicationDocumentsDirectory()).path;
var task = await downloader.download(
  url: url,
  autoStart: false,
  path: path,
  maxSplit: 1,
  fileName: "${name}easyDownloader",
);
task.addListener((task) {
  //listen all task update
  setState(() {
    
    });
});
task.addSpeedListener((length) {
  //listen speed
  speedTask[task.downloadId] = length;
  setState(() {
  
  });
});
///show notification if you want(only tested on android)
task.showNotification();

Additional information

  • only tested on android, ios, macos

  • sometime your downloaded length will exceed the total length, it is not problem, this problem occurs if your file is small

License

Copyright (c) 2021 linkkader

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

easy_downloader's People

Contributors

linkkader avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

easy_downloader's Issues

notification Support ?

hi thank for the amazing package
one question:
download notification not showing and found no documentation about that
whats AndroidManifest.xml configuration?

fix: Notification Progress doesn't update correctly

Description

I have been utilizing a this package for downloading video files, and overall, it has proven to be quite effective. However, I have encountered a minor issue wherein the notification displaying the download progress fails to update the current value accurately. Despite the download completing successfully in most cases, the notification progress tends to become stuck at around 70-80 percent.

Furthermore, on certain occasions, the package throws an error stating "connection closed." It would be highly beneficial if there were a built-in mechanism to automatically retry the download from the point at which it was interrupted. Additionally, it would be greatly appreciated if there were a manual option available to re-download the video if needed.

I have also observed that once the package encounters an error, it ceases to initiate any further downloads until the application is closed and reopened. This behavior seems to persist until the app is restarted.

These observations have been made while testing the package on Android 13.

Despite the aforementioned issues, I must acknowledge that this package has proven to be an invaluable asset. I sincerely appreciate your efforts and contributions in developing such a useful tool. Thank you very much.

Steps To Reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected Behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional Context

Add any other context about the problem here.

Notification not working

Description

A clear and concise description of what the bug is.

Steps To Reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected Behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional Context

Add any other context about the problem here.

Resume issue while downloading.

When multiple files are dowloading clicking the pause button pauses the app after that resuming is not working .When app is relaunched then only the resume functionality is working.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.