Package com.google.android.exoplayer2.ui

## Class DownloadNotificationUtil

- java.lang.Object
- - com.google.android.exoplayer2.ui.DownloadNotificationUtil

-     @Deprecated
      public final class DownloadNotificationUtil
      extends Object

  Deprecated.
  Using this class can cause notifications to flicker on devices with `Util.SDK_INT` < 21. Use `DownloadNotificationHelper` instead.

- - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### buildProgressNotification

          public static Notification buildProgressNotification​(Context context,
                                                               @DrawableRes
                                                               int smallIcon,
                                                               String channelId,
                                                               @Nullable
                                                               PendingIntent contentIntent,
                                                               @Nullable
                                                               String message,
                                                               List<Download> downloads)

      Deprecated.
      Returns a progress notification for the given downloads.
      Parameters:
        `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.
      Returns:
        The notification.

    - #### buildDownloadCompletedNotification

          public static Notification buildDownloadCompletedNotification​(Context context,
                                                                        @DrawableRes
                                                                        int smallIcon,
                                                                        String channelId,
                                                                        @Nullable
                                                                        PendingIntent contentIntent,
                                                                        @Nullable
                                                                        String message)

      Deprecated.
      Returns a notification for a completed download.
      Parameters:
        `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.
      Returns:
        The notification.

    - #### buildDownloadFailedNotification

          public static Notification buildDownloadFailedNotification​(Context context,
                                                                     @DrawableRes
                                                                     int smallIcon,
                                                                     String channelId,
                                                                     @Nullable
                                                                     PendingIntent contentIntent,
                                                                     @Nullable
                                                                     String message)

      Deprecated.
      Returns a notification for a failed download.
      Parameters:
        `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.
      Returns:
        The notification.