Issue in cordova plugin ionic-native/downloader/ngx

import { Downloader, DownloadRequest, NotificationVisibility } from ‘@ionic-native/downloader/ngx’;

const url = this.violationVideosPath + this.violation_video;
var request: DownloadRequest = {
uri: url,
title: ‘MyDownload’,
description: ‘’,
mimeType: ‘’,
visibleInDownloadsUi: true,
notificationVisibility: NotificationVisibility.VisibleNotifyCompleted,
destinationInExternalFilesDir: {
dirType: ‘Downloads’,
subPath: ‘MyFile.mp4’
}
};

  this.downloader.download(request)
    .then((location: string) => {
      console.log('File downloaded at:' + location)
      this.toastService.showSuccess("Video downloaded successfully","success")
    })
    .catch((error: any) => {
      console.error(error)
    }
    );

i am using this plugin to download the file in mobile here I am getting this path “file:///storage/emulated/0/Android/data/io.vms.app/files/Downloads/MyFile.mp4”
but I am not able to see this path in my mobile app, it is not creating any path in mobile,
can any one please help me with this and here I need to use only cordova plugin

Thank you

First off, @ionic-native is dead and was migrated over to awesome-cordova-plugins back in 2021. See A New Chapter for @ionic-native - Ionic Blog.

I don’t see the downloader plugin in the awesome-cordova-plugin repo so it’s most likely not a viable option any more.

The plugin uses GitHub - Luka313/integrator-cordova-plugin-downloader: Cordova android plugin for downloading files via DownloadManager which hasn’t been updated for 5 years so my guess is that it no longer supports the latest version of Android.

1 Like

I am also facing the same issue in ‘downloader’ while upgrading to Ionic 7. So, what can I do for this? Are there any alternations ?