Package com.google.android.exoplayer2.ui

## Class DownloadNotificationHelper

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

-     public final class DownloadNotificationHelper
      extends Object

  Helper for creating download notifications.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DownloadNotificationHelper​(Context context, String channelId)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Notification` | `buildDownloadCompletedNotification​(Context context, int smallIcon, PendingIntent contentIntent, String message)` | Returns a notification for a completed download.
    `Notification` | `buildDownloadFailedNotification​(Context context, int smallIcon, PendingIntent contentIntent, String message)` | Returns a notification for a failed download.
    `Notification` | `buildProgressNotification​(Context context, int smallIcon, PendingIntent contentIntent, String message, List<Download> downloads)` | 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`

- - ### Constructor Detail

    - #### DownloadNotificationHelper

          public DownloadNotificationHelper​(Context context,
                                            String channelId)

      Parameters:
        `context` - A context.
        `channelId` - The id of the notification channel to use.

  - ### Method Detail

    - #### buildProgressNotification

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

      Returns a progress notification for the given downloads.
      Parameters:
        `context` - A context.
        `smallIcon` - A small icon for the notification.
        `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 Notification buildDownloadCompletedNotification​(Context context,
                                                                 @DrawableRes
                                                                 int smallIcon,
                                                                 @Nullable
                                                                 PendingIntent contentIntent,
                                                                 @Nullable
                                                                 String message)

      Returns a notification for a completed download.
      Parameters:
        `context` - A context.
        `smallIcon` - A small icon for the notifications.
        `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 Notification buildDownloadFailedNotification​(Context context,
                                                              @DrawableRes
                                                              int smallIcon,
                                                              @Nullable
                                                              PendingIntent contentIntent,
                                                              @Nullable
                                                              String message)

      Returns a notification for a failed download.
      Parameters:
        `context` - A context.
        `smallIcon` - A small icon for the notifications.
        `contentIntent` - An optional content intent to send when the notification is clicked.
        `message` - An optional message to display on the notification.
      Returns:
        The notification.