AgoraIO-Extensions / react-native-agora

React Native around the Agora RTC SDKs for Android and iOS agora
https://www.agora.io
MIT License
624 stars 227 forks source link

FOREGROUND_SERVICE_MEDIA_PROJECTION permission #823

Open mattallard123 opened 4 days ago

mattallard123 commented 4 days ago

Describe the bug I am getting an error on the Google Play Store now when uploading my app with react-native-agora. This permission is added to the AndroidManifest when built, and appears to be used for screen sharing. Google Play asks for a video example of the use case that requires this permission, however I don't have one as I don't use the screen sharing feature in my app. I am only using Agora for video chat / video recording from the device camera.

To Reproduce Steps to reproduce the behavior:

  1. ./gradlew bundleRelease
  2. Upload aab to Google Play
  3. Get error: Your app uses the FOREGROUND_SERVICE_MEDIA_PROJECTION permission. You can only use this permission if your app performs tasks noticeable to the user when they're not directly interacting with your app.

Expected behavior Not add this permission to my AndroidManifest at build if I am not using screen sharing feature, or have some way to flag it. I have added the following to my project/android/build.gradle but not working:

configurations.all { exclude group:"io.agora.rtc", module:"full-screen-sharing" }

Additional context "react-native": "0.75.2" "react-native-agora": "^4.4.0"

guoxianzhe commented 4 days ago

@mattallard123 You should exclude Screen Sharing extension , pls refer https://github.com/AgoraIO-Extensions/Agora-Flutter-SDK/issues/1666#issuecomment-2311455391

mattallard123 commented 3 days ago

@guoxianzhe Maybe add to react-native-agora Readme under setup, as someone who is just using streaming and not sharing, I missed that completely. Thanks so much!

guoxianzhe commented 3 days ago

will add README in 4.5.0