Closed gkasireddy202 closed 2 years ago
You don't need any full storage permissions on android while using this library. So remove this: .WRITE_EXTERNAL_STORAGE
from Android Manifest.
To take permissions use openDocumentTree
method. Then use createDirectory
on the returned directory uri.
Hi Team,
'/storage/emulated/0'does not have permission to create directories - This error is occurred by using below code for creating the directory in external storage.
createDirectory=async()=>{
const path =
${RNFS.ExternalStorageDirectoryPath}
; try { const granted = await PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE ); if (granted == PermissionsAndroid.RESULTS.GRANTED) { ScopedStorage.createDirectory(path, "TEST").then((obj) => { alert(obj) }) .catch(error => { console.log("ERROR" + error) })}