You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/11/29 08:45:00 UTC
[GitHub] [cordova-plugin-file] Maheshvy commented on issue #426: Storage updates in Android 11
Maheshvy commented on issue #426:
URL: https://github.com/apache/cordova-plugin-file/issues/426#issuecomment-981405951
please let me know I'm also facing same issue for android 11 device (Cordova android@10 ).
code :
window.resolveLocalFileSystemURL(cordova.file.externalRootDirectory, function(dir) {
dir.getFile("test.pdf", {create:true}, function(file) {
file.createWriter(function(fileWriter) {
fileWriter.write("byteArrays data");
alert('Message', 'File Downloaded Successfully');
}, function(){
alert('Error!', "Unable to save the file");
});
},function(e){
alert('Error!', e);
});
},function(e){
console.log(e);
});
**I tried with below code in Androidmainfest file**
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACTION_MANAGE_STORAGE" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>
**Config.xml file**
<preference name="AndroidInsecureFileModeEnabled" value="true" />
<preference name="AndroidPersistentFileLocation" value="Compatibility" />
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org