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

Using the library pulls in automatically android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION permission #56

Open
chr4ss12 opened this issue Jul 22, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@chr4ss12
Copy link

chr4ss12 commented Jul 22, 2024

I added the library to my project, and I did NOT add

"android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" permission, however when I went to submit my app to Play Store, it required me to explain for what I am using this permission for.

Upon investigating a bit, I think the culprit is file node_modules/@daily-co/react-native-webrtc/android/src/main/AndroidManifest.xml

that has

<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />

added to it.

I do not exactly understand how the playstore permission detection or Android manifests work, but regardless I've had to change my own Androidmanifest to get rid of this:

<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" tools:node="remove"/>
@chr4ss12 chr4ss12 added the bug Something isn't working label Jul 22, 2024
@gewfy
Copy link
Contributor

gewfy commented Aug 6, 2024

We have the exact same issue :)

@mkilincaslan
Copy link

We had the same issue, I did not add this permission into AndroidManifest file but we published it to Google Play Store and today we are facing an issue on Prod as;

Unable to start service com.daily.reactlibrary.DailyOngoingMeetingForegroundService@b4473a5 with Intent { cmp=com.myapp.com/com.daily.reactlibrary.DailyOngoingMeetingForegroundService (has extras) }: android.app.MissingForegroundServiceTypeException: Starting FGS without a type callerApp=ProcessRecord{33373f7 23705:com.bluecallapp.client/u0a131} targetSDK=34

Even though we did tests in Staging and didn't face any issue, this happened on prod and I am assuming we must to add this permission in Manifest file! And Daily developers should add this information in documents!

@filipi87
Copy link
Contributor

filipi87 commented Sep 5, 2024

Hi, thank you for reporting this.

As @chr4ss12 mentioned in the issue, the problem lies within react-native-webrtc, and it was introduced in our SDK when we updated to incorporate the most recent changes.

You shouldn't need to add this dependency unless it's actually being used, such as when you intend to enable screen sharing in your app.

We already have a task in our backlog to address this issue. I'll let you know as soon as we release a version with the fix.

@mkilincaslan
Copy link

Hello @filipi87,
Thank you for the answer but how did I come up to that we need to add these permissions in our manifest file is because of I saw that in the DailyPlayground App has these permissions in AndroidManifest file.

So if we should not add this into Manifest while then why does DailyPlayground App have it?

@filipi87
Copy link
Contributor

filipi87 commented Sep 5, 2024

Hi @mkilincaslan,

You should only need to add this if you intend to support screen sharing. In our playground example, we do support screen sharing, so we include this permission. And that is correct.

However, if you don't plan to support screen sharing in your app, you shouldn't need to add this permission.

@mkilincaslan
Copy link

I see @filipi87,

Thank you for clarifying it!
Is this issue related to comment as well that I posted here?

So should I wait for the new fix version?

@filipi87
Copy link
Contributor

filipi87 commented Sep 5, 2024

While we don't release a version with the fix, and if you don't need to support screen share, you can do as suggested in the first comment of this issue, that is to change your Androidmanifest to remove the need of this permission:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants