Skip to content
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
@erhutime

Description

@erhutime

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')
                })

            })

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions