ThinDownloadManager

Thin DownloadManager is an android library primary to download files and to avoid using DOWNLOAD_WITHOUT_NOTIFICATION permission when using Android provided DownloadManager in your application.

Why ?

There are few reasons why you might want to use this library.

Usuage

DownloadStatusListener (Deprecated)

#### **DownloadStatusListenerV1**
  * Provides call back option to know when the download is completed, failed and reason for failure, and to know the progress of the download. DownloadRequest is given back in the callback so that you can easily set some Object as context to download request and get the context object back from the request object.
``` java
    //Callback when download is successfully completed
    void onDownloadComplete(DownloadRequest downloadRequest);

    //Callback if download is failed. Corresponding error code and
    //error messages are provided
    void onDownloadFailed(DownloadRequest downloadRequest, int errorCode, String errorMessage);

    //Callback provides download progress
    void onProgress(DownloadRequest downloadRequest, long totalBytes, long downloadedBytes, int progress);

DownloadRequest

ThinDownloadManager

No Permissions Required

Setup

Include below line your build.gradle:

dependencies {
    compile 'com.mani:ThinDownloadManager:1.4.0'
}

Make sure you included jcenter() in your repositories section.

Download

Get it on Google Play

Android Arsenal

Credits

https://android.googlesource.com/platform/packages/providers/DownloadProvider/

NOTE: Android's DownloadManager has plenty of features which is not available in ThinDownloadManager. For ex. pause and continue download when network connectivity changes.So analyse your requirement thoroughly and decide which one to use.

https://www.virag.si/2015/01/publishing-gradle-android-library-to-jcenter/ Steps for uploading to bintray.

License

 Copyright 2013 Mani Selvaraj

 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.