ylliX - Online Advertising Network
Vertex AI - Antrophic and Mistral models: Why does it require Imegen access?

Expo ScreenCapture and Android Permissions (READ_MEDIA_IMAGES and READ_MEDIA_VIDEO)


The application has protected content and I have to limit the number of screenshots. The application is React Native Expo. When I add the code as specified in the expo site and then create a build, download it from Google and receive an email. In the message in the Google console I write that this is to control the number of screenshots, but again I receive this email: We found that your app is not compliant with how the READ_MEDIA_IMAGES/READ_MEDIA_VIDEO permissions are allowed to be used.
Your app only requires one-time or infrequent access to media files on the device. Only apps with a core use case that require persistent access to photo and video files located in shared storage on devices are allowed to use photo and video permissions. For more details on the requirements, please see Google Play’s Photo and Video Permissions policy.

Are there other methods or how can I do it without warning?

code

const hasPermissions = async () => {
        const { status } = await ScreenCapture.requestPermissionsAsync();
        return status === 'granted';
    };

    useEffect(() => {
        let subscription;

        const addListenerAsync = async () => {
          if (await hasPermissions()) {
             if (user) {
                dispatch(addAndGetScreenshotsQuantity())
                  .then((response) => {
                })
             }
          } else {
             console.error('Permissions needed to subscribe to screenshot events are missing!');
          }
       };
       addListenerAsync();

       return () => {
          subscription?.remove();
       }
  }, []);

in app.json permissions empty array
"android": { "adaptiveIcon": { "foregroundImage": "./assets/adaptive-icon.png", }, "permissions": [], },

I tried the code on the expo site.



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *