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 2021/10/05 11:03:52 UTC

[GitHub] [cordova-plugin-media] erisu edited a comment on pull request #316: Android 11 compatibility

erisu edited a comment on pull request #316:
URL: https://github.com/apache/cordova-plugin-media/pull/316#issuecomment-934303474


   Out of curiosity, have you tried using the[`Context#getExternalFilesDir(String)`](https://developer.android.com/reference/android/content/Context#getExternalFilesDir(java.lang.String)), [`MediaStore`](https://developer.android.com/reference/android/provider/MediaStore), or [`Intent#ACTION_OPEN_DOCUMENT`](https://developer.android.com/reference/android/content/Intent#ACTION_OPEN_DOCUMENT)?
   
   The three options above were mentioned on the Android Docs as alternatives to **`getExternalStorageDirectory`**, as it was deprecated, and offer better performance.
   
   From Android Docs, regarding to `Context#getExternalFilesDir(String)`
   
   > This is like getFilesDir() in that these files will be deleted when the application is uninstalled, however there are some important differences:
   
   > * Shared storage may not always be available, since removable media can be ejected by the user. Media state can be checked using Environment#getExternalStorageState(File).
   > * There is no security enforced with these files. For example, any application holding Manifest.permission.WRITE_EXTERNAL_STORAGE can write to these files.
   


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