@Deprecated public final class DownloadNotificationUtil extends Object
Util.SDK_INT < 21. Use DownloadNotificationHelper instead.| Modifier and Type | Method | Description |
|---|---|---|
static Notification |
buildDownloadCompletedNotification(Context context,
int smallIcon,
String channelId,
PendingIntent contentIntent,
String message) |
Deprecated.
Returns a notification for a completed download.
|
static Notification |
buildDownloadFailedNotification(Context context,
int smallIcon,
String channelId,
PendingIntent contentIntent,
String message) |
Deprecated.
Returns a notification for a failed download.
|
static Notification |
buildProgressNotification(Context context,
int smallIcon,
String channelId,
PendingIntent contentIntent,
String message,
List<Download> downloads) |
Deprecated.
Returns a progress notification for the given downloads.
|
public static Notification buildProgressNotification(Context context, @DrawableRes int smallIcon, String channelId, @Nullable PendingIntent contentIntent, @Nullable String message, List<Download> downloads)
context - A context for accessing resources.smallIcon - A small icon for the notification.channelId - The id of the notification channel to use.contentIntent - An optional content intent to send when the notification is clicked.message - An optional message to display on the notification.downloads - The downloads.public static Notification buildDownloadCompletedNotification(Context context, @DrawableRes int smallIcon, String channelId, @Nullable PendingIntent contentIntent, @Nullable String message)
context - A context for accessing resources.smallIcon - A small icon for the notifications.channelId - The id of the notification channel to use.contentIntent - An optional content intent to send when the notification is clicked.message - An optional message to display on the notification.public static Notification buildDownloadFailedNotification(Context context, @DrawableRes int smallIcon, String channelId, @Nullable PendingIntent contentIntent, @Nullable String message)
context - A context for accessing resources.smallIcon - A small icon for the notifications.channelId - The id of the notification channel to use.contentIntent - An optional content intent to send when the notification is clicked.message - An optional message to display on the notification.