Baseflow / flutter-permission-handler

Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions.
https://baseflow.com
MIT License
2.05k stars 858 forks source link

[Question]: NEW Android Photo and Video Permissions policy #1380

Open AlexMichels opened 1 month ago

AlexMichels commented 1 month ago

Please check the following before submitting a new issue.

Please select for which platform(s) you need help

Your question

Our App uses the permission_handler and file_picker to set a custom wallpaper background. I suddenly saw those news from Android. Can we continue to use permission_handler and file_picker for our app? Anyone experience with switching the way photos are ulpoaded and stored?

We do not use READ_MEDIA_IMAGES or READ_MEDIA_VIDEO in the app. We check the permission with Permission.storage.request() for Android SdkInt < 33. From Android 33 onwards, no additional permissions are required. Presumably, READ_MEDIA access is only needed if you want to access media created by other apps—which has not been relevant for us so far. Is that correct?

Last October, Android introduced the Photo and Video Permissions policy to reduce the number of apps permitted to request broad photo/video permissions (READ_MEDIA_IMAGES and READ_MEDIA_VIDEO). Starting October 31, 2024, apps may only access photos and videos for purposes directly related to app functionality. Apps that have a one-time or infrequent need to access these files are requested to use a system picker, such as the Android photo picker. Learn more https://developer.android.com/reference/android/Manifest.permission#READ_MEDIA_IMAGES https://support.google.com/googleplay/android-developer/answer/14115180

Version

11.3.1

kmoreau commented 1 month ago

Hello,

Same here, need some information about this (i work on a messaging app which can send medias, upload avatar picture, etc but no modification). I follow this post

MBulli commented 1 month ago

We have the same problem. Interestingly, the <use-permissions READMEDIA*> tags are not present in the app bundle's AndroidManifest.xml file. Maybe this is the same problem as with Apple, that the static code analysis of the play console triggers a false positive?

rdonoso commented 1 month ago

@MBulli hi, I have the same issue, were you able to find a solution?

MBulli commented 1 month ago

@rdonoso Nope

nayan-dabhi commented 3 weeks ago

@AlexMichels @kmoreau @rdonoso @MBulli I faced the same issue but after reviewing all the permission declared using merge menifest option in android studio. I have found this permissions are declared in open_filex package so have submitted the required declaration in google playstore and it's now accepted from them.

Screenshot 2024-10-14 at 1 22 18 PM
swenhancer commented 3 weeks ago

In case someone else is in the same situation - when permissions are not really required, for example when min android sdk is >= 33, it is possible to explicitly remove permissions this way:

    <!-- Remove unnecessary media permissions -->
    <uses-permission
        android:name="android.permission.READ_MEDIA_IMAGES"
        tools:node="remove" />
    <uses-permission
        android:name="android.permission.READ_MEDIA_VIDEO"
        tools:node="remove" />
    <uses-permission
        android:name="android.permission.READ_MEDIA_AUDIO"
        tools:node="remove" />

The above code will remove any permissions from dependencies merged to project's manifest during the build process.

akifarhan commented 2 weeks ago

@AlexMichels @kmoreau @rdonoso @MBulli I faced the same issue but after reviewing all the permission declared using merge menifest option in android studio. I have found this permissions are declared in open_filex package so have submitted the required declaration in google playstore and it's now accepted from them. Screenshot 2024-10-14 at 1 22 18 PM

Hi @nayan-dabhi , can you explain more about the required declaration?

PraveenGangula1392 commented 1 week ago

Guys, any update on this issue ?

felipecosta-dev commented 1 week ago

following