Может кто-нибудь помочь выяснить, почему мое приложение настаивает на том, что плагин FileOpener не установлен, когда он на самом деле установлен?
Каждый раз, когда я пытаюсь открыть PDF / Image / Docx / XlSX или любой другой тип файла, который я получаюуведомление в консоли, как показано ниже:

Я следовал этому уроку здесь построчно и когда я изучал файлСтруктура Я вижу, что плагин FileOpener есть, см .:


Inмой app.module.ts:

В моем файле user.provider.ts:


Это моя функция DownloadDocument:
async DownloadDocument( location: string, name: string, mime: string, message: string = undefined )
{
var loading = await this.ShowLoading( message );
try
{
var dir = '';
if ( this.IsIOS )
{
dir = this.file.documentsDirectory;
}
else if ( this.IsAndroid )
{
dir = this.file.dataDirectory;
}
dir = `${dir}${name.replace(/ /g, '')}`;
const fileTransfer: FileTransferObject = this.transfer.create();
fileTransfer.download(`${this.APIUrl}/${location}`, dir, true)
.then( ( f ) =>
{
this.fp.open( f.toURL(), mime ).then( () =>
{
console.log('File is opened')
} )
.catch(err =>
{
console.log('Open Error: ' + JSON.stringify( err ));
});
loading.dismiss();
}, ( error ) =>
{
console.log('Download Error: ' + JSON.stringify( error ));
loading.dismiss();
} );
}
catch( error )
{
console.log('General Error: ' + JSON.stringify( error ));
loading.dismiss();
}
}
Следует отметить, что если я использую DocumentViewerПлагин, он может открывать файлы PDF.Но я хотел бы использовать плагин FileOpener, поскольку намереваюсь открывать другие файлы, кроме PDF.
Может кто-нибудь увидеть, что я делаю неправильно?