Open erhutime opened 7 years ago
I have the same issue
"Download manager could not resolve downloaded file path."
@erhutime are you find the solution ?
I had the same problem with this code but it was easily fixed by specifying the path.
didn't work.
const android = RNFetchBlob.android
RNFetchBlob.config({
addAndroidDownloads : {
useDownloadManager : true,
title : 'awesome.apk',
description : 'An APK that will be installed',
mime : 'application/vnd.android.package-archive',
mediaScannable : true,
notification : true,
}
})
.fetch('GET', `http://www.example.com/awesome.apk`)
.then((res) => {
android.actionViewIntent(res.path(), 'application/vnd.android.package-archive')
})
did work
const android = RNFetchBlob.android
RNFetchBlob.config({
addAndroidDownloads : {
useDownloadManager : true,
title : 'awesome.apk',
description : 'An APK that will be installed',
mime : 'application/vnd.android.package-archive',
mediaScannable : true,
notification : true,
path: RNFetchBlob.fs.dirs.DownloadDir+"/filename.ext"
}
})
.fetch('GET', `http://www.example.com/awesome.apk`)
.then((res) => {
android.actionViewIntent(res.path(), 'application/vnd.android.package-archive')
})
Hi:
android.actionViewIntent(res.path(), 'application/vnd.android.package-archive')
possible unhandled promise rejection download manager could not resolve downloaded file path
but then promise: