javaandroidstorage-access-frameworkscoped-storage

Properly querying MediaStore records on Android 11


I am working on providing Android 11 support on my audio/video player app. My main concern is actually with not provoking the Google tribe with their no All files access permission allowed for player apps. I do not want my app to be rejected on publishing on the Google store.

In previous APIs, I am using WRITE_EXTERNAL_STORAGE permission including Android 10 (where I opt out off Scoped Storage). Though, I do not know how to handle Android 11 without having my app rejected on publishing on Google store. I have learned that READ_EXTERNAL_STORAGE permission is needed for querying MediaStore records and I have the following questions:

  1. Will asking for READ_EXTERNAL_STORAGE on runtime on Android 11 be acceptable with Google (when I publish my app on their store)?
  2. Can I ask for WRITE_EXTERNAL_STORAGE permission on runtime instead of READ_EXTERNAL_STORAGE for all APIs and the system on Android 11 devices would substitute that for READ_EXTERNAL_STORAGE or will I need to add conditions where I ask for READ_EXTERNAL_STORAGE on Android 11 devices.
  3. Will asking for WRITE_EXTERNAL_STORAGE on runtime on Android 11 be acceptable with Google (when I publish my app on their store)?

Solution

  • you may use all these permissions without any ban from Google. you can't/shouldn't use MANAGE_EXTERNAL_STORAGE, new perm dedicated for Scoped Storage and file managing apps, antivirs and other "privileged" soft