我下载了apk文件并打开下载的文件
const fileTransfer: FileTransferObject = this.transfer.create();
const url = data;
console.log(this.file, 'files');
fileTransfer.download(url, this.file.externalDataDirectory + 'b2taxi.apk').then((entry) => {
console.log(entry, entry.toURL());
this.fileopener.open(entry.toURL(), 'application/vnd.android.package-archive').then(() => {
console.log('file opened');
}, err => {
console.log('error open file: ', err);
});
}, (error) => {
console.log(error, 'error');
});
回调返回成功,但文件未打开。在离子4