Skip to content

can't open .apk using rn-fetch-blob after download it #887

@JayonLiu

Description

@JayonLiu

i download a apk, i want to open it, but make a Error like this:
Error: open failed: EACCES (Permission denied)

this is my code:
RNFetchBlob.config({
addAndroidDownloads: {
useDownloadManager: true,
title: "XXXX.apk",
description: "An APK that will be installed",
mime: "application/vnd.android.package-archive",
path: ${RNFetchBlob.fs.dirs.DownloadDir}/XXXX.apk,
mediaScannable: true,
notification: true,
},
})
.fetch(
"GET",
updateInfo.downloadUrl //
)
.then((res) => {
android.actionViewIntent(
res.path(),
"application/vnd.android.package-archive"
);
})
.catch((err) => {
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions