Crash on getting videoID
While trying to get video ID from downloadEntry app crash because of downloadEntry object was null
@@ -154,12 +154,14 @@ public class VideoDownloadHelper {
}
public void downloadVideo(DownloadEntry downloadEntry, final FragmentActivity activity, final DownloadManagerCallback callback) {
+ if (downloadEntry != null) {
List<DownloadEntry> downloadEntries = new ArrayList<>();
downloadEntries.add(downloadEntry);
startDownload(downloadEntries, activity, callback);
analyticsRegistry.trackSingleVideoDownload(downloadEntry.getVideoId(),
downloadEntry.getEnrollmentId(), downloadEntry.getVideoUrl());
}
+ }
private void startDownload(List<DownloadEntry> downloadList,
final FragmentActivity activity,
