use of androidx.media3.exoplayer.offline.DownloadNotificationHelper in project media by androidx.
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;
}
Aggregations