Search in sources :

Example 1 with DownloadNotificationHelper

use of com.google.android.exoplayer2.ui.DownloadNotificationHelper in project ExoPlayer by google.

the class DemoDownloadService method getDownloadManager.

@Override
protected DownloadManager getDownloadManager() {
    // This will only happen once, because getDownloadManager is guaranteed to be called only once
    // in the life cycle of the process.
    DownloadManager downloadManager = DemoUtil.getDownloadManager(/* context= */
    this);
    DownloadNotificationHelper downloadNotificationHelper = DemoUtil.getDownloadNotificationHelper(/* context= */
    this);
    downloadManager.addListener(new TerminalStateNotificationHelper(this, downloadNotificationHelper, FOREGROUND_NOTIFICATION_ID + 1));
    return downloadManager;
}
Also used : DownloadNotificationHelper(com.google.android.exoplayer2.ui.DownloadNotificationHelper) DownloadManager(com.google.android.exoplayer2.offline.DownloadManager)

Aggregations

DownloadManager (com.google.android.exoplayer2.offline.DownloadManager)1 DownloadNotificationHelper (com.google.android.exoplayer2.ui.DownloadNotificationHelper)1