我的APK使用下载器。我的代码是:
var req: DownloadRequest = {
uri: 'xyz.com',
title: 'TryMe' ,
description: 'TryMe',
mimeType: "video/mp4",
visibleInDownloadsUi: true,
notificationVisibility: NotificationVisibility.VisibleNotifyCompleted,
destinationInExternalFilesDir: {
dirType: 'Downloads',
subPath: 'MyFile.apk',
}
};
this.dwn.download(req)
.then((location: string) => {
alert(location)
}).catch((err) => {
alert("DWN ser Err 42: " + JSON.stringify(err))
return "";
})
文件下载时我想停止其他功能。下载完成后,程序和功能将继续。我该怎么办?