Krantikc commented on issue #577:
URL: 
https://github.com/apache/cordova-plugin-file/issues/577#issuecomment-1638028144

   > @Krantikc try to add logs and to see in log cat. from what i see, you will 
arrive here:
   > 
   > ```
   > private boolean hasReadPermission() {
   >         if (android.os.Build.VERSION.SDK_INT >= 
Build.VERSION_CODES.TIRAMISU) {
   >             return PermissionHelper.hasPermission(this, 
Manifest.permission.READ_MEDIA_IMAGES) 
   >             && PermissionHelper.hasPermission(this, 
Manifest.permission.READ_MEDIA_VIDEO)
   >             && PermissionHelper.hasPermission(this, 
Manifest.permission.READ_MEDIA_AUDIO);
   >           } else {
   >             return PermissionHelper.hasPermission(this, 
Manifest.permission.READ_EXTERNAL_STORAGE);
   >           }
   >     }
   > ```
   > 
   > or here:
   > 
   > ```
   >   private boolean hasWritePermission() {
   >           if (android.os.Build.VERSION.SDK_INT >= 
Build.VERSION_CODES.TIRAMISU) {
   >                 return true;
   >               } else {
   >                 return PermissionHelper.hasPermission(this, 
Manifest.permission.WRITE_EXTERNAL_STORAGE);
   >               }
   >     }
   > ```
   > 
   > please make sure you have those changes (for the write permission).
   > 
   > try remove ing the plugin and add it from my fork, i tried on few devices 
android 10-13 and all works. cordova plugin remove cordova-plugin-file cordova 
plugin add https://github.com/EYALIN/cordova-plugin-file.git
   
   @EYALIN Thanks a lot for quick reply, it's working fine. My bad, after 
importing your forked repo, issue was resolved, but file was not opening up 
because of **cordova-plugin-file-opener2** plugin. I was getting NOT_FOUND 
error, as there was mismatch in file protocol, whose way handling has been 
changed as part of **[email protected]**.
   
   Thanks Again !! :)


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to