Friday 28 October 2022

Android 13 - How to request WRITE_EXTERNAL_STORAGE

I am targeting my Android app for Android 13 (API 33)

The WRITE_EXTERNAL_STORAGE permission seems to be working fine below API 33 i.e. Android 12 and less but the runtime permission popup for WRITE_EXTERNAL_STORAGE won't appear when running the app on Android 13.

My Android app creates one keystore file in app's private storage.

The behaviour changes for Android 13 mention this:

If your app targets Android 13, you must request one or more new permissions instead of the READ_EXTERNAL_STORAGE.

The new permissions are:

  • Images and photos: READ_MEDIA_IMAGES
  • Videos: READ_MEDIA_VIDEO Audio
  • Audio files: READ_MEDIA_AUDIO

I didn't find any information about this in the official documentation. The documentation is focusing on media files only without any word about other file types.

https://developer.android.com/about/versions/13/behavior-changes-13#granular-media-permissions



from Android 13 - How to request WRITE_EXTERNAL_STORAGE

No comments:

Post a Comment