-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
99 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 22 additions & 1 deletion
23
filedownloader/src/main/java/com/murerwa/filedownloader/DownloadInterface.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,26 @@ | ||
package com.murerwa.filedownloader | ||
|
||
import android.util.Log | ||
|
||
const val TAG = "MURERWA_DOWNLOADER" | ||
|
||
interface DownloadInterface { | ||
fun onDownloadProgressChanged(newProgress: Int) | ||
fun onDownloadProgressChanged(newProgress: Int) { | ||
Log.d(TAG, "DownloadProgress - $newProgress") | ||
} | ||
|
||
fun onErrorOccurred(error: String) { | ||
// Default implementation | ||
Log.d(TAG, "Error - $error") | ||
} | ||
|
||
fun onDownloadStarted() { | ||
// Default implementation | ||
Log.d(TAG, "Message - File Download started") | ||
} | ||
|
||
fun onDownloadCompleted() { | ||
// Default implementation | ||
Log.d(TAG, "Success - File Download completed") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters