It seems that it allows you to open only local files: File Opener: This plugin will open a file on your device file system with its default application.
At the end I’ve used this code using DocumentViewer:
openRemoteFileByUrl(fileUrl, content_type='application/pdf'){
const transfer = this.transfer.create();
let path = null;
if (this.platform.is('ios')) {
path = this.file.documentsDirectory;
} else if (this.platform.is('android')) {
path = this.file.dataDirectory;
}
transfer.download(fileUrl, path + 'myfile.pdf').then(entry => {
let url = entry.toURL();
this.document.viewDocument(url, content_type, {});
});
}
It works, however I’ve seen that the use of FileTransfer is deprecated.
For now I’ll use it the same, but I’ll look for a different way of downloading the file.