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 2020/09/16 18:18:06 UTC

[GitHub] [cordova-plugin-file] russaa commented on issue #243: A way to NOT requre android.permission.WRITE_EXTERNAL_STORAGE?

russaa commented on issue #243:
URL: https://github.com/apache/cordova-plugin-file/issues/243#issuecomment-693576880


   a workaround I am currently using:  
   
   create a minimal cordova plugin which basically only consists of the `plugin.xml` where the `` permission is removed, something like
   ```xml
   <?xml version='1.0' encoding='utf-8'?>
   <plugin id="cordova-plugin-remove-android-write-external-storage-permission" version="0.0.1" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
   <name>RemoveWriteExternalStoragePermission</name>
   
   <platform name="android">
   
     <!-- HACK must use file="app/src/main/AndroidManifest.xml" otherwise cordova thinks this is a confict (... but with adding permissions via config-files directives ... probably a BUG in cordova-common) -->
     <edit-config file="app/src/main/AndroidManifest.xml" target="/manifest" mode="merge">
       <manifest xmlns:tools="http://schemas.android.com/tools" />
     </edit-config>
   
     <config-file target="AndroidManifest.xml" parent="/*">
       <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:node="remove" />
     </config-file>
   
   </platform>
   
   </plugin>
   ```


----------------------------------------------------------------
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.

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