From 121e736424b87907ffb81cc4e7b350f0cc986888 Mon Sep 17 00:00:00 2001 From: knaito-asial Date: Sun, 22 Jan 2023 22:42:19 +0900 Subject: [PATCH 1/4] feat: remove WRITE_EXTERNAL_STORAGE permission from plugin.xml --- README.md | 11 +++++++++++ plugin.xml | 3 --- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3bf3ebd9..519379df 100644 --- a/README.md +++ b/README.md @@ -269,6 +269,17 @@ Marshmallow requires the apps to ask for permissions when reading/writing to ext for these two directories unless external storage is not mounted. However due to a limitation, when external storage is not mounted, it would ask for permission to write to `cordova.file.externalApplicationStorageDirectory`. +### SDK Target less than 29 + +As the official document [Storage updates in Android 11](https://developer.android.com/about/versions/11/privacy/storage), `WRITE_EXTERNAL_STORAGE` permission no longer provide any additional access. +If you need to add this permission, please add followings in your `config.xml`. + +```xml + + + +``` + ## iOS Quirks - `cordova.file.applicationStorageDirectory` is read-only; attempting to store diff --git a/plugin.xml b/plugin.xml index 7c23c6df..c3881811 100644 --- a/plugin.xml +++ b/plugin.xml @@ -132,9 +132,6 @@ to config.xml in order for the application to find previously stored files. - - - From 47e83d1095d63d05af485ca4c59b81ae42870d7d Mon Sep 17 00:00:00 2001 From: knight9999 Date: Tue, 24 Jan 2023 16:21:38 +0900 Subject: [PATCH 2/4] feat: update README about config.xml for android --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 519379df..ec68338f 100644 --- a/README.md +++ b/README.md @@ -271,13 +271,13 @@ permission to write to `cordova.file.externalApplicationStorageDirectory`. ### SDK Target less than 29 -As the official document [Storage updates in Android 11](https://developer.android.com/about/versions/11/privacy/storage), `WRITE_EXTERNAL_STORAGE` permission no longer provide any additional access. -If you need to add this permission, please add followings in your `config.xml`. - +From the official [Storage updates in Android 11](https://developer.android.com/about/versions/11/privacy/storage) documentation, the [`WRITE_EXTERNAL_STORAGE`](https://developer.android.com/reference/android/Manifest.permission#WRITE_EXTERNAL_STORAGE) permission is no longer operational and does not provide access. +> If this permission is not allowlisted for an app that targets an API level before [`Build.VERSION_CODES.Q`](https://developer.android.com/reference/android/os/Build.VERSION_CODES#Q) (SDK 29) this permission cannot be granted to apps. +If you need to add this permission, please add the following to your `config.xml`. ```xml - - - + + + ``` ## iOS Quirks From f085fb45a3cbeec80d48d82375a08660a9d9cbc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=A8=E3=83=AA=E3=82=B9?= Date: Tue, 24 Jan 2023 23:54:56 +0900 Subject: [PATCH 3/4] doc(README): apply suggestions from code review --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ec68338f..7c55a34c 100644 --- a/README.md +++ b/README.md @@ -269,10 +269,12 @@ Marshmallow requires the apps to ask for permissions when reading/writing to ext for these two directories unless external storage is not mounted. However due to a limitation, when external storage is not mounted, it would ask for permission to write to `cordova.file.externalApplicationStorageDirectory`. -### SDK Target less than 29 +### SDK Target Less Than 29 From the official [Storage updates in Android 11](https://developer.android.com/about/versions/11/privacy/storage) documentation, the [`WRITE_EXTERNAL_STORAGE`](https://developer.android.com/reference/android/Manifest.permission#WRITE_EXTERNAL_STORAGE) permission is no longer operational and does not provide access. + > If this permission is not allowlisted for an app that targets an API level before [`Build.VERSION_CODES.Q`](https://developer.android.com/reference/android/os/Build.VERSION_CODES#Q) (SDK 29) this permission cannot be granted to apps. + If you need to add this permission, please add the following to your `config.xml`. ```xml From 2eb7dc517ab876317f89cb80d6a8e1af9ee60884 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=A8=E3=83=AA=E3=82=B9?= Date: Tue, 24 Jan 2023 23:55:46 +0900 Subject: [PATCH 4/4] doc(README): apply code review suggestion --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 7c55a34c..76a40234 100644 --- a/README.md +++ b/README.md @@ -276,6 +276,7 @@ From the official [Storage updates in Android 11](https://developer.android.com/ > If this permission is not allowlisted for an app that targets an API level before [`Build.VERSION_CODES.Q`](https://developer.android.com/reference/android/os/Build.VERSION_CODES#Q) (SDK 29) this permission cannot be granted to apps. If you need to add this permission, please add the following to your `config.xml`. + ```xml