Code Monkey home page Code Monkey logo

download-manager's Introduction

download-manager

This is a copy of the http://developer.android.com/reference/android/app/DownloadManager.html but it allows for downloading to private internal storage.

Description

The download manager is a system service that handles long-running HTTP downloads. Clients may request that a URI be downloaded to a particular destination file. The download manager will conduct the download in the background, taking care of HTTP interactions and retrying downloads after failures or across connectivity changes and system reboots. Instances of this class should be obtained through getSystemService(String) by passing DOWNLOAD_SERVICE. Apps that request downloads through this API should register a broadcast receiver for ACTION_NOTIFICATION_CLICKED to appropriately handle when the user clicks on a running download in a notification or from the downloads UI. Note that the application must have the INTERNET permission to use this class.

Adding to your project

To start using this library, add these lines to the build.gradle of your project:

repositories {
    jcenter()
}

dependencies {
    compile 'com.novoda:download-manager:0.2.13'
}

If using Proguard follow the instructions here

Simple usage

Simple example source code can be found in this demo module: Android Simple Demo

You will need to add this to your Android application build.gradle:

android {
  defaultConfig {
       // other things
       
       manifestPlaceholders = [downloadAuthority: "com.your.unique.authority"]
  }
}

You also need to create this file in this exact package (we hope to do this for you in the future):

package com.novoda.downloadmanager;

public class Authority {
    public static final String AUTHORITY = "com.your.unique.authority";
}

There are many more features. See Advanced Usage, or take a look at the demo-extended sample app for details.

Links

Here are a list of useful links:

  • We always welcome people to contribute new features or bug fixes, here is how
  • If you have a problem check the Issues Page first to see if we are working on it
  • For further usage or to delve more deeply checkout the Project Wiki
  • Looking for community help, browse the already asked Stack Overflow Questions or use the tag: support-download-manager when posting a new question

download-manager's People

Contributors

ronocod avatar zegnus avatar blundell avatar amlcurran avatar ouchadam avatar dorvaryn avatar xrigau avatar friedger avatar danybony avatar electryc avatar stylingandroid avatar ataulm avatar rock3r avatar

Watchers

 avatar

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.