cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From riknoll <>
Subject [GitHub] cordova-plugin-file pull request: CB-11142: Fix the NeedPermission...
Date Mon, 25 Apr 2016 21:12:29 GMT
Github user riknoll commented on a diff in the pull request:
    --- Diff: ---
    @@ -273,6 +273,15 @@ Listing asset directories is really slow on Android. You can speed
it up though,
     adding `src/android/build-extras.gradle` to the root of your android project (also
     requires cordova-android@4.0.0 or greater).
    +### Permisson to write to external storage when it's not mounted
    +Marshmallow requires the apps to ask for permissions when reading/writing to external
locations. By default, your app has permission to write to
    +`cordova.file.applicationStorageDirectory` and `cordova.file.externalApplicationStorageDirectory`,
with the latter becoming available when the external storage 
    +is mounted and available to use. When the external storage is mounted, the plugin would
check if the path of the file being handled falls within these 
    +directories and would ask for permission if it's not so. However when the external storage
is not mounted, `cordova.file.externalApplicationStorageDirectory` 
    +is not available and the plugin would only be able to check the file path wrt `cordova.file.applicationStorageDirectory`.
So if your app tries to write to 
    +externalApplicationStorageDirectory when the external storage is not mounted, the plugin
would still ask for permission and then fail since that path is not available.
    --- End diff --
    Don't bother explaining why it fails. Just state the behavior and say that it is "due
to a limitation in Android". That is, we never request runtime permission for those two directories
unless external storage is not mounted. Also, clarify that this is only on Marshmallow.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message