Enable Screen Sharing (opt-in)
From Calls SDK 5.1, starting a screen share on Android is opt-in. Android needs a foreground service of typemediaProjection to capture the screen, and Google Play asks every app that declares one to justify it, so the SDK
removes that service from your merged manifest. Until your app declares it, the screen share button is hidden in the
call UI. Viewing other participants’ screen shares works without any of this.
To let Android users share their screen, add the permission and the service to your AndroidManifest.xml:
mediaProjection type and, when your app targets Android 14 or later, for the
FOREGROUND_SERVICE_MEDIA_PROJECTION permission. If either is missing it logs the reason and keeps the button hidden.
On Android 9 and below no foreground service is needed, so the button is always available there.
Declaring a
mediaProjection foreground service means you will have to describe how your app uses it in the Google
Play Console. Leave the service out if your users never need to share their screen from Android.How It Works
When a participant starts screen sharing:- The SDK receives the screen share stream
- The call layout automatically adjusts to display the shared screen prominently
- Every participant, including Android participants, can view the shared content
Listen for Screen Share Events
Monitor when participants start or stop screen sharing:- Kotlin
- Java
Check Screen Share Status
Use theisPresenting property on the Participant object to check if someone is sharing their screen:
- Kotlin
- Java