This repository was archived by the owner on Mar 16, 2019. It is now read-only.
This repository was archived by the owner on Mar 16, 2019. It is now read-only.
addAndroidDownloads apk,someone android phone .apk chang to .text #427
Open
Description
hi, use addAndroidDownloads apk, some one android pone xxxx.apk change to xxxx.txt;
how to fiexd it?
RNFetchBlob
.config({
fileCache:true ,
addAndroidDownloads : {
useDownloadManager : true, // <-- this is the only thing required
notification : true,
mime : 'text/plain',
description : 'File downloaded by download manager.'
}
})
.fetch('GET', url, {
})
.progress((received, total) => {
console.log('开始下载。。。。。。。。');
})
.then((res) => {
// the temp file path
console.log('....开始下载', res.path());
this.setState({
path:res.path()
},()=>{
console.log(res.path() + '下载完成 :' + this.state.path)
android.actionViewIntent(res.path(), 'application/vnd.android.package-archive')
})
})