ZionFileDownloader

Additional

Language
Java
Version
0.1.1 (Aug 19, 2017)
Created
Aug 19, 2017
Updated
Aug 19, 2017 (Retired)
Owner
Caner Yılmaz (caneryilmaz)
Contributor
Caner Yılmaz (caneryilmaz)
1
Activity
Badge
Generate
Download
Source code

The ZionFactory help you download files with so short code

create an instance from ZionDownloadFactory set fileUrl and fileName parameter

ZionDownloadFactory factory = new ZionDownloadFactory(this, pdfUrl, "fileName");
        DownloadFile downloadFile = factory.downloadFile(FILE_TYPE.PDF);
        downloadFile.start(new ZionDownloadListener() {
            @Override
            public void OnSuccess(String dataPath) {
                // the file saved in your device..
                //dataPath--> android/{your app package}/files/Download
            }

            @Override
            public void OnFailed(String message) {

            }

            @Override
            public void OnPaused(String message) {

            }

            @Override
            public void OnPending(String message) {

            }

            @Override
            public void OnBusy() {

            }
        });

for choosing another type download mode just change FILE_TYPE parameter..

can change download status info strings
   <string name="mp3_file_title_dw"></string>
   <string name="image_file_title_dw"></string>
   <string name="pdf_file_title_dw"></string>
   <string name="video_file_title_dw"></string>
   <string name="status_downloading_dw"></string>
dependencies
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
 }
}
dependencies {
  compile 'com.github.caneryilmaz:ZionFileDownloader:0.1.1'
 }