itinance / itinance/react-native-fs
Unable to create Folder in Android 11
- Dominant language
- C++
- Stars
- 5k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
downloadFile = async (url) => {
try {
const granted = await PermissionsAndroid.request(
PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE,
{
title: 'Storage Permission',
message: 'App needs access to memory to download the file ',
},
);
if (granted === PermissionsAndroid.RESULTS.GRANTED) {
console.log("Permission Granted")
let dirs = RNFetchBlob.fs.dirs.MainBundleDir;
const execute = await RNFS.mkdir(`${dirs}/Jharkhand Update Database`)
console.log(execute)
console.log(dirs);
} else {
ToastAndroid.showWithGravity(
'You need to give storage permission to download the file',
ToastAndroid.SHORT,
ToastAndroid.BOTTOM,
);
}
} catch (err) {
console.log('Random ', err);
}
};
Unable to create a folder in android 11 tried in other DocumentDir & SDCardApplicationDir as well.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.