flutter_photo_manager icon indicating copy to clipboard operation
flutter_photo_manager copied to clipboard

[Feature][Android] Support for MANAGE_MEDIA permission

Open ua741 opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe.

For media management / gallery apps, the user should not see system pop up to confirm deletion of the media.

Describe the solution you'd like

Ability fetch the status and open Media management app settings so that user can toggle the permission for managing media.

Additional context

This permission is only available on Android 12 and above

Application will need to declare this permission in the Manifest.

<uses-permission android:name="android.permission.MANAGE_MEDIA">

To request the permission we need to invoke this intent with current package's name

https://developer.android.com/reference/android/provider/Settings#ACTION_REQUEST_MANAGE_MEDIA

We can fetch the permission status using this API

MediaStore.canManageMedia(ctx)

ua741 avatar Jan 10 '23 06:01 ua741