Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comply with new Google Play's Photo and Video Permissions policy - removal of READ_MEDIA_IMAGES and READ_MEDIA_VIDEO permissions #119

Open
AndyDesign999 opened this issue Oct 8, 2024 · 6 comments
Assignees

Comments

@AndyDesign999
Copy link

AndyDesign999 commented Oct 8, 2024

In our app, we are using only READ_MEDIA_IMAGES permission, we don't use READ_MEDIA_VIDEO permission in our app. But somehow, Play Store shows that our app uses both permissions. So my question is, by the use of this library, can we make separation for READ_MEDIA_IMAGES and READ_MEDIA_VIDEO permission, or anything else? So that we just need to give justification only for READ_MEDIA_IMAGES permission on the play store.

Motivation

Google announced a new Google Play's Photo and Video Permissions policy.
The full details are available at https://support.google.com/googleplay/android-developer/answer/14115180?hl=en

This is mainly about upcoming changes around the READ_MEDIA_IMAGES and READ_MEDIA_VIDEO permissions.

Quoting:

Mid 2024: Apps with one-time or infrequent use of photos requested to use a system photo picker and remove READ_MEDIA_IMAGES and READ_MEDIA_VIDEO permissions from their app manifest.
Early 2025: Only apps with broad access core functionality can use READ_MEDIA_IMAGES and READ_MEDIA_VIDEO permissions.

Apps using those permissions for only Image upload are likely to fall into this "one-time or infrequent use of photos" bucket.
See https://support.google.com/googleplay/android-developer/answer/14115180?hl=en#zippy=%2Cwhat-does-it-mean-to-have-a-one-time-or-infrequent-use-of-photos-or-video-files

What does it mean to have a one-time or infrequent use of photos or video files?
Examples of one-time or infrequent use of photos or video files include, but are not limited to, uploading a profile picture, uploading an image for a playlist, or uploading a photo of a check for banking purposes. Infrequent use infers that your app does not have a photo or video use case as its core functionality. If your app has a one-time or infrequent use case for photo or video files, you may not use the READ_MEDIA_IMAGES or READ_MEDIA_VIDEO permission, and we urge you to instead use a system picker to preserve user privacy.

Proposed solution

Google suggests using a system picker, such as an Android photo picker.
See https://support.google.com/googleplay/android-developer/answer/14115180?hl=en# and https://developer.android.com/training/data-storage/shared/photopicker

Timeline is clarified at https://support.google.com/googleplay/android-developer/answer/14115180?hl=en

Screenshot 2024-10-08 at 5 25 54 PM
@akashmi
Copy link
Member

akashmi commented Oct 8, 2024

@AndyDesign999
If your app does not utilize the video picker or related features, you can add the following code in app manifest file to remove the READ_MEDIA_VIDEO permission from your app.

 <uses-permission android:name="android.permission.READ_MEDIA_VIDEO" tools:node="remove" />

Feel free to post any comments if you have questions, or close the issue if the this works for you.

@AndyDesign999
Copy link
Author

AndyDesign999 commented Oct 10, 2024

@akashmi
Thanks for your quick response!

I have a follow-up question.

  1. According to the new guidelines, one-time or infrequent photo access must now be handled via the Android Photo Picker. If I remove both the READ_MEDIA_VIDEO and READ_MEDIA_IMAGES permissions from the manifest, as you suggested, would I still be able to use this library as the Android Photo Picker/System Picker?

→ I noticed that the library includes the option MediaType.FILE_TYPE_WITH_SYSTEM_VIEW, but the Android Photo Picker API works without requiring any image permissions (like READ_MEDIA_IMAGES). If I remove the following permissions from the manifest:

<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" tools:node="remove" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" tools:node="remove" />

and then try to open the Lassi image picker with MediaType.FILE_TYPE_WITH_SYSTEM_VIEW, I receive an alert stating, "Photos and Videos related permission is not granted. Please allow it from the settings."

→ My primary goal is to use the Android Photo Picker without any permissions, while also having image cropping and compression functionality integrated into your library.

@akashmi
Copy link
Member

akashmi commented Oct 14, 2024

You can use the Photo Picker without needing to handle the READ_MEDIA_IMAGES and READ_MEDIA_VIDEO permissions.

Refer to the code below for implementation.

https://github.com/Mindinventory/Lassi-Android?tab=readme-ov-file#way-of-utilizing-photo-picker

        val intent = Lassi(this)
                .with(LassiOption.GALLERY)
                .setMediaType(MediaType.PHOTO_PICKER)
                .setMaxCount(4)
                .setStatusBarColor(R.color.colorPrimaryDark)
                .setToolbarColor(R.color.colorPrimary)
                .setToolbarResourceColor(android.R.color.white)
                .setProgressBarColor(R.color.colorAccent)
                .setGalleryBackgroundColor(R.color.colorGrey)
                .setCustomLimitExceedingErrorMessage("Selected item exceeded the limit!")
                .build()

@AndyDesign999
Copy link
Author

AndyDesign999 commented Oct 14, 2024

@akashmi Thanks for your response!
I'm experiencing a couple of issues with the Lassi library v1.4.1:

  1. Crop and Compression Functionality: The PHOTO_PICKER(MediaType.PHOTO_PICKER) works fine for selecting photos, but the crop and compression functionality does not seem to be working with MediaType.PHOTO_PICKER.

  2. MediaType.PHOTO_PICKER includes both photos and videos: I can see both photos and videos when using MediaType.PHOTO_PICKER. However, I only want to allow access to images. Is there a way to limit the picker to images only?

@akashmi
Copy link
Member

akashmi commented Oct 14, 2024

@AndyDesign999
Those features have not been implemented in the current version of the SDK. They have been added to the backlog and will be available in the next release.

@AndyDesign999
Copy link
Author

AndyDesign999 commented Oct 14, 2024

@akashmi
Thank you so much for your prompt response and for adding these features to the backlog! I

If I may kindly ask, do you anticipate the next version of the Lassi library being released before October 31, 2024? As per Google Play’s guidelines, apps that request READ_MEDIA_IMAGES and READ_MEDIA_VIDEO permissions need to either submit a declaration for core use/broad access or remove these permissions if the use case is infrequent. Given this, it’s important for me to know if the upcoming version—addressing the crop and compression functionality, as well as limiting selection to images only—will be available before that deadline, so I can plan accordingly.

Thank you once again for your assistance and consideration!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants