You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Ibrahim M. Ghazal (JIRA)" <ji...@apache.org> on 2017/10/23 07:31:00 UTC

[jira] [Created] (CB-13481) file:///android_asset/ shouldn't require READ_EXTERNAL_STORAGE permission

Ibrahim M. Ghazal created CB-13481:
--------------------------------------

             Summary: file:///android_asset/ shouldn't require READ_EXTERNAL_STORAGE permission
                 Key: CB-13481
                 URL: https://issues.apache.org/jira/browse/CB-13481
             Project: Apache Cordova
          Issue Type: Bug
          Components: cordova-plugin-file
    Affects Versions: Master
         Environment: cordova-android 6.3.0. 
Running on Android 6.0. 
            Reporter: Ibrahim M. Ghazal


On Android 6+, trying to read a file from {{cordova.file.applicationDirectory}} ({{file:///android_asset/}}) opens the runtime permissions window and asks the user "Allow AppName to access photos, media, and files on your device?". This is obviously incorrect as the app always has the permission to read its own assets.

Sample code that shows the issue:
{code}
function log(a) {console.log(a);};
resolveLocalFileSystemURL(cordova.file.applicationDirectory, function(applicationDirectory) {
  applicationDirectory.getFile('www/index.js', {}, log, log);
}, log);
{code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org