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 2022/11/29 03:48:09 UTC
[GitHub] [cordova-plugin-file] breautek commented on issue #426: Storage updates in Android 11
breautek commented on issue #426:
URL: https://github.com/apache/cordova-plugin-file/issues/426#issuecomment-1330036817
> Add code below to AndroidManifest.xml, and you can write file to storage root directory like cordova.file.externalRootDirectory:
>
> ```
> <manifest xmlns:tools="http://schemas.android.com/tools">
> ...
> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:ignore="ScopedStorage"/>
> <application android:requestLegacyExternalStorage="true">
> ...
> </manifest>
> ```
>
> Tested on Android 11
This isn't standard behaviour or it works because the build isn't targeting API 30 or later as the Android docs explicitly states [WRITE_EXTERNAL_STORAGE](https://developer.android.com/reference/android/Manifest.permission#WRITE_EXTERNAL_STORAGE) when targeting API 30 / Android 11 or later. Additionally when targeting API 30, scoped storage is enforced and [requestLegacyExternalStorage](https://developer.android.com/about/versions/11/privacy/storage) is ignored.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
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