android / storage-samples

Multiple samples showing the best practices in storage APIs on Android.
Apache License 2.0
1.53k stars 576 forks source link

All Files Permissions in Android 12 #308

Closed Rodrigo-Gil closed 2 years ago

Rodrigo-Gil commented 2 years ago

Hello,

I have researched how to solve this "issue" in the documentation and on the web, but unfortunately was not able to find anything. We are currently running the Android 11 In the project I am working on, we have the all files permissions in the code, so everytime the application starts on a new device, it will ask for the permissions. However, in Android 12, instead of displaying only the application that is requesting all files permissions, it displays all the applications when our application is requesting access.

It is important to highlight that our code is following Android's documentation and we are using the ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION

Is there a way to prevent this behaviour just displaying our app's permissions? We want to avoid this behaviour, since users can change the settings for other app's and that's potentially dangerous for our user.

Thanks in Advance

Rodrigo-Gil commented 2 years ago

Added the Scope Storage as a solution.