public class FileDownloadNotificationHelper<T extends BaseNotificationItem> extends Object
| Constructor and Description |
|---|
FileDownloadNotificationHelper() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(T notification)
Input a
BaseNotificationItem. |
void |
cancel(int id)
Cancel the notification by notification id.
|
void |
clear()
Clear and cancel all notifications which inside this helper
notificationArray. |
boolean |
contains(int id) |
T |
get(int id)
Get
BaseNotificationItem by the download id. |
T |
remove(int id)
Remove the
BaseNotificationItem by the download id. |
void |
showIndeterminate(int id,
int status)
Show the notification with indeterminate progress.
|
void |
showProgress(int id,
int sofar,
int total)
Show the notification with the exact progress.
|
public T get(int id)
BaseNotificationItem by the download id.id - The download id.public boolean contains(int id)
public T remove(int id)
BaseNotificationItem by the download id.id - The download id.BaseNotificationItem.public void add(T notification)
BaseNotificationItem.public void showProgress(int id,
int sofar,
int total)
id - The download id.sofar - The downloaded bytes so far.total - The total bytes of this task.public void showIndeterminate(int id,
int status)
id - The download id.status - FileDownloadStatuspublic void cancel(int id)
id - The download id.public void clear()
notificationArray.