Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Master
-
None
-
None
-
cordova-android 6.3.0.
Running on Android 6.0.
Description
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:
function log(a) {console.log(a);};
resolveLocalFileSystemURL(cordova.file.applicationDirectory, function(applicationDirectory) {
applicationDirectory.getFile('www/index.js', {}, log, log);
}, log);