yasirkula / UnityNativeGallery

A native Unity plugin to interact with Gallery/Photos on Android & iOS (save and/or load images/videos)
MIT License
1.43k stars 199 forks source link

warning when submitting app update to google play store #331

Closed binouze closed 1 month ago

binouze commented 1 month ago

Description of the bug

On my last game update I receive a warning on Google Play Console when I try to create a new release.

All developers requesting access to the photo and video permissions are required to tell Google Play about the core functionality of their app

The warning say that I have the following undeclared permissions:

android.permission.READ_MEDIA_IMAGES android.permission.READ_MEDIA_VIDEO

With the following text:

You can only use these permissions if your app is a gallery app, or if its core functionality is editing, managing, and maintaining photos. Otherwise, you must migrate to the Android photo picker, or a photo picker of your choice.

I opened the aab\base\manifest\AndroidManifest.xml and I don't see any of these permissions As this is the only plugin I use that is related to access images from the device, maybe it's related to this plugin.

I have the possibility to describe the app's use of the permission but as noted in their message if the image access is not a core functionality I shouldn't use it.

Do you have any plan to release an update (or maybe a new plugin) that uses the Android Photo Picker ?

yasirkula commented 1 month ago

My plugins need to use Android X support library to benefit from Android Photo Picker. While this change is awesome in theory, my native plugins will no longer be the simple plug & play solutions that they are now. It may require using External Dependency Manager; I don't know the full up-to-date requirements.

That being said, I'm not asking for these permissions in any of my plugins. I used to do that but after seeing this warning message, I immediately removed them. Now, images are picked without any permissions.

https://github.com/yasirkula/UnityNativeGallery/commits/master/.github/AAR%20Source%20(Android)/AndroidManifest.xml

binouze commented 1 month ago

Ok, thanks.

I already tried to make a plugin to use the photo picker API but as Unity's Activity is an Activity and not an AppCompatActivity I didn't found a way to make it work xD.

As I don't see these permissions in my app bundle manifest , it should be related to one of the plugin I use, do you know a way to find out which one is causing this warning in the play console ?

binouze commented 1 month ago

OK sorry for wasting your time, I found that the warning comes from an old version in a paused closed testing track. Don't know why Google shows the warning when I submit the new version... Everything is OK, thanks for all, I close the issue.