Skip to content

Google Play Console "Sensitive Permissions" declaration error when using react-native-capture-protection #86

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

Closed
Supra-HarshitPadalia opened this issue May 28, 2025 · 3 comments

Comments

@Supra-HarshitPadalia
Copy link

When uploading an Android build using react-native-capture-protection to Google Play Console, we encounter the following error:
Google Api Error: Invalid request - All developers requesting access to the photo and video permissions are required to tell Google Play about the core functionality of their app.
It seems that react-native-capture-protection requests access to photo or video permissions (e.g., READ_MEDIA_IMAGES, READ_MEDIA_VIDEO, READ_EXTERNAL_STORAGE) even though its functionality focuses on screen capture protection.

Expected Behavior

The library should not request sensitive permissions (like photo and video access) unless absolutely necessary for its core functionality.

Actual Behavior

The app is being flagged during Google Play Console upload for requesting photo/video permissions, requiring a "Sensitive Permissions" declaration, even though these permissions are not relevant to the core functionality.

Steps to Reproduce

  1. Integrate react-native-capture-protection into a React Native project.
  2. Build an Android APK or AAB.
  3. Upload the build to Google Play Console.
  4. Observe the error related to photo/video sensitive permissions.

Environment

  • Library version: 2.0.7
  • React Native version: 0.74.7
  • Android target SDK: 34

Suggested Fix

  • Review the library’s permissions in the AndroidManifest or codebase to remove unnecessary permissions like READ_MEDIA_IMAGES, READ_MEDIA_VIDEO, or READ_EXTERNAL_STORAGE.
  • Consider limiting permissions to only what's needed for the library's functionality (screen capture protection).
@wn-na
Copy link
Owner

wn-na commented May 30, 2025

@Supra-HarshitPadalia hi, This issue appears to be the same as the issue below.

#59

I'll consider how to limit the permissions that users can select.

@wn-na
Copy link
Owner

wn-na commented Jun 9, 2025

hello. @Supra-HarshitPadalia I added the ability to select that option in the latest version.

In android/app/build.gradle, set like this

    defaultConfig {
        missingDimensionStrategy "react-native-capture-protection", "restrictedCapture"
    }

@Supra-HarshitPadalia
Copy link
Author

hello. @Supra-HarshitPadalia I added the ability to select that option in the latest version.

In android/app/build.gradle, set like this

defaultConfig {
    missingDimensionStrategy "react-native-capture-protection", "restrictedCapture"
}

Now it is working fine, thanks @wn-na for a prompt response

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

2 participants