我使用 react-native-fetch-blob 下载我的 apk,然后更新应用程序。但是当我使用 rfb downloadmanager config for android 时,不会调用进度方法。是什么原因?
RNFetchBlob
.config({
addAndroidDownloads : {
useDownloadManager : required
notification : true,
mime : 'text/plain',
description : 'File downloaded by download manager.'
}
})
.fetch('GET', 'http://example.com/file/somefile')
.then((resp) => {
// the path of downloaded file
resp.path()
})..progress((received, total) => {
console.log('progress', received / total)
})