# React Native - shareScreen() does not turn on screen share

**URL:** <https://devforum.zoom.us/t/react-native-sharescreen-does-not-turn-on-screen-share/123818>\
**Category:** React Native\
**Tags:** video-sdk\
**Created:** [January 3, 2025, 3:01pm UTC](https://devforum.zoom.us/t/react-native-sharescreen-does-not-turn-on-screen-share/123818 "2025-01-03T15:01:50Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![faiziqureshi2504](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/faiziqureshi2504/32/52233_2.png) [@faiziqureshi2504](https://devforum.zoom.us/u/faiziqureshi2504)\
**Post date:** [January 3, 2025, 3:01pm UTC](https://devforum.zoom.us/t/react-native-sharescreen-does-not-turn-on-screen-share/123818/1 "2025-01-03T15:01:50Z")

</div>

**Description**  
I am using `@zoom/react-native-videosdk:"^1.10.10"` when I call `zoom.shareHelper.shareScreen()` it opens a popup to start now sharing screen, but nothing happens after that.  
I have also tried updating the library to latest version 1.13.10, but still facing the same issue.  
I am following the same steps as mentioned in the [documentation](https://developers.zoom.us/docs/video-sdk/react-native/1.13.10/share/#ios-and-android)  
On the other hand, in iOS it records the screen and save it in my iPhone gallery. But doesnt share the screen to other user.

**React Native Video SDK version**  
1.10.10

**Video SDK Code Snippets**

```auto
const onOpenScreenShareMenu = async () => {
    const isSharingLocked = await zoom.shareHelper.isShareLocked();
    if (!isSharingLocked) {
      await zoom.shareHelper.shareScreen();
    }
  };

```

**Screenshots**

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/3/1/317b1ada459c6888178893316f52d2141544bcad.jpeg)

---

<div class="post-metadata">

**Author:** ![ekaansh.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ekaansh.zoom/32/55004_2.png) [@ekaansh.zoom](https://devforum.zoom.us/u/ekaansh.zoom)\
**Post date:** [January 7, 2025, 10:53am UTC](https://devforum.zoom.us/t/react-native-sharescreen-does-not-turn-on-screen-share/123818/2 "2025-01-07T10:53:19Z")

</div>

Hey @faiziqureshi2504

Have you followed all the platform specific steps here: [Video SDK - React Native - Screen Sharing - Zoom Developers](https://developers.zoom.us/docs/video-sdk/react-native/1.13.10/share/#android)? Have you set up the foreground service for Android?

---

<div class="post-metadata">

**Author:** ![faiziqureshi2504](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/faiziqureshi2504/32/52233_2.png) [@faiziqureshi2504](https://devforum.zoom.us/u/faiziqureshi2504)\
**Post date:** [January 7, 2025, 3:26pm UTC](https://devforum.zoom.us/t/react-native-sharescreen-does-not-turn-on-screen-share/123818/3 "2025-01-07T15:26:04Z")

</div>

Thank you @ekaansh.zoom for responding on my post.  
Yes, I tried adding permission `FOREGROUND_SERVICE_MICROPHONE` and `FOREGROUND_SERVICE` in my `app.json`, as I am working in React Native. But its still not working. When I call `zoom.shareHelper.shareScreen()` it doesnt start sharing screen.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/a/1/a149678952d701387617cde0081e5bb138f1d908.png)

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/f/2/f21b6af6ac1e65bee293eda4e0238f7b5fdf2a35.png)

What else you think might be the cause?

---

<div class="post-metadata">

**Author:** ![ekaansh.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ekaansh.zoom/32/55004_2.png) [@ekaansh.zoom](https://devforum.zoom.us/u/ekaansh.zoom)\
**Post date:** [January 8, 2025, 11:51am UTC](https://devforum.zoom.us/t/react-native-sharescreen-does-not-turn-on-screen-share/123818/4 "2025-01-08T11:51:01Z")

</div>

No I meant did you create the `NotificationService.java` file in `ndroid/app/src/main/java/com/<your_app_org>/<your_app_name>/`as described in the docs?

It should look like this:

```java
public class NotificationService extends Service {
  private final String CHANNEL_ID = "rn_zoom_video_sdk_notification_channel_id";
  private final int NOTIFICATION_ID = 9;
...
 }

}

```

You can find the full code in the [docs](https://developers.zoom.us/docs/video-sdk/react-native/1.13.10/share/#android).

Additionally, can you also confirm setting up `android/app/src/main/java/com/<your_app_org>/<your_app_name>/MainActivity.kt`? You need to add the following code:

```kotlin
import android.app.Activity;
import android.content.Intent;
import us.zoom.sdk.ZoomVideoSDK;
import us.zoom.sdk.ZoomVideoSDKShareHelper;
...
  override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
      super.onActivityResult(requestCode, resultCode, data)
      if (requestCode == 0 && resultCode == Activity.RESULT_OK) {
          val intent = Intent(this, NotificationService::class.java)
          val shareHelper = ZoomVideoSDK.getInstance().shareHelper
          if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
              startForegroundService(intent)
          } else {
              startService(intent)
          }
          shareHelper.startShareScreen(data)
      }
  }

```

Can also be found in the same doc.

---

<div class="post-metadata">

**Author:** ![faiziqureshi2504](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/faiziqureshi2504/32/52233_2.png) [@faiziqureshi2504](https://devforum.zoom.us/u/faiziqureshi2504)\
**Post date:** [January 8, 2025, 12:42pm UTC](https://devforum.zoom.us/t/react-native-sharescreen-does-not-turn-on-screen-share/123818/5 "2025-01-08T12:42:49Z")

</div>

I am a bit lost here @ekaansh.zoom . I am using React Native Expo Bare workflow setup, these files supposed to be created automatically inside `android` folder.  
If I create these files inside android folder by myself, then while building the apk or ios apps, these files not be there.  
Do you get my point? Or am I wrong?

---

<div class="post-metadata">

**Author:** ![faiziqureshi2504](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/faiziqureshi2504/32/52233_2.png) [@faiziqureshi2504](https://devforum.zoom.us/u/faiziqureshi2504)\
**Post date:** [January 8, 2025, 5:01pm UTC](https://devforum.zoom.us/t/react-native-sharescreen-does-not-turn-on-screen-share/123818/6 "2025-01-08T17:01:08Z")

</div>

Where can I get `CHANNEL_ID` ? It can be anything but unique value? Or is it somewhere in Zoom Admin Account?

---

<div class="post-metadata">

**Author:** ![ekaansh.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ekaansh.zoom/32/55004_2.png) [@ekaansh.zoom](https://devforum.zoom.us/u/ekaansh.zoom)\
**Post date:** [January 9, 2025, 10:43am UTC](https://devforum.zoom.us/t/react-native-sharescreen-does-not-turn-on-screen-share/123818/7 "2025-01-09T10:43:24Z")

</div>

When you run expo prebuild, it’ll generate the required ios and android directories inside your react-native app directory. You’ll then have to manually create/modify these files as explained in our documentations. Please follow all the steps as in the docs.

You can see this diff for the setup: [Comparing zoom:main...EkaanshArora:diff-for-screenshare-setup · zoom/videosdk-reactnative-quickstart · GitHub](https://github.com/zoom/videosdk-reactnative-quickstart/compare/main...EkaanshArora:VideoSDK-ReactNative-Quickstart:diff-for-screenshare-setup)

---

<div class="post-metadata">

**Author:** ![faiziqureshi2504](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/faiziqureshi2504/32/52233_2.png) [@faiziqureshi2504](https://devforum.zoom.us/u/faiziqureshi2504)\
**Post date:** [January 10, 2025, 12:06pm UTC](https://devforum.zoom.us/t/react-native-sharescreen-does-not-turn-on-screen-share/123818/8 "2025-01-10T12:06:12Z")

</div>

@ekaansh.zoom For the iOS, do I have to follow the same steps as described in [documentation for iOS](https://developers.zoom.us/docs/video-sdk/react-native/1.13.10/share/#ios)? Is it possible for you to provide me a GitHub code for iOS zoom screen sharing implementation, just as you sent me GitHub link for android?

---

<div class="post-metadata">

**Author:** ![ekaansh.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ekaansh.zoom/32/55004_2.png) [@ekaansh.zoom](https://devforum.zoom.us/u/ekaansh.zoom)\
**Post date:** [January 10, 2025, 1:26pm UTC](https://devforum.zoom.us/t/react-native-sharescreen-does-not-turn-on-screen-share/123818/9 "2025-01-10T13:26:33Z")

</div>

> [@faiziqureshi2504](#):
>
> or the iOS, do I have to follow the same steps as described in [documentation for iOS](https://developers.zoom.us/docs/video-sdk/react-native/1.13.10/share/#ios)?

Yes.

> [@faiziqureshi2504](#):
>
> Is it possible for you to provide me a GitHub code for iOS zoom screen sharing implementation, just as you sent me GitHub link for android?

The diff I linked has the setups instructions for both Android and iOS. See the `feat: ios screenshare` [commit](https://github.com/zoom/videosdk-reactnative-quickstart/commit/101f50ace7ce22e8ebed56dc364fc7499873b227) in particular for iOS.

---

<div class="post-metadata">

**Author:** ![faiziqureshi2504](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/faiziqureshi2504/32/52233_2.png) [@faiziqureshi2504](https://devforum.zoom.us/u/faiziqureshi2504)\
**Post date:** [January 13, 2025, 11:34am UTC](https://devforum.zoom.us/t/react-native-sharescreen-does-not-turn-on-screen-share/123818/10 "2025-01-13T11:34:53Z")

</div>

@ekaansh.zoom I tried the documentation you have provided for ios & android.

`Android`  
Now when I call the `zoom.shareHelper.shareScreen();` the screen gets blacked but nothing showed on the other end of the user i.e. the web client. It does prints `ZoomVideoSDKShareStatus_Start`in the logs for android, but nothing appears on the web side that has `@zoom/videosdk`. The canvas on the web, increases the height when the shareScreen() function called on the android. Other than that the video call and microphone works fine.

`IOS`  
Also from the iOS, when I call the `screenShare()` it stars recording the screen, instead of sharing the screen, and when I stop it, it saved the recording to my phone gallary. Other than that the video call and microphone works fine.

Is this issue sounds familiar to you? Is it because I am passing the `channel_id` wrong? Or should I have to implement anything related to `handling screen share` on the web side as well, thats why its not appearing on the web side? I mean is there anything Im missing on the web side related to screen sharing?

`Note: Screen share option is only available on phone, and web side users can only see the phone screens. So we are not implementing the screen share option in the web side.`

---

<div class="post-metadata">

**Author:** ![rehema.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rehema.zoom/32/40323_2.png) [@rehema.zoom](https://devforum.zoom.us/u/rehema.zoom)\
**Post date:** [January 15, 2025, 8:48pm UTC](https://devforum.zoom.us/t/react-native-sharescreen-does-not-turn-on-screen-share/123818/11 "2025-01-15T20:48:14Z")

</div>

HI @faiziqureshi2504,

Thank you for sharing more about this during our office hours, it was great to chat with you. Could you share code snippets for your android and iOS screen share implementation?

Thanks,  
Rehema

---

<div class="post-metadata">

**Author:** ![faiziqureshi2504](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/faiziqureshi2504/32/52233_2.png) [@faiziqureshi2504](https://devforum.zoom.us/u/faiziqureshi2504)\
**Post date:** [January 15, 2025, 9:00pm UTC](https://devforum.zoom.us/t/react-native-sharescreen-does-not-turn-on-screen-share/123818/12 "2025-01-15T21:00:07Z")

</div>

@rehema.zoom Sure, here are few code snippets that I hope helps you understand pretty much the code structure:

Thats how Im using the `ZoomView` from `@zoom/react-native-videosdk`

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/4/7/473367603058f71207d99c554c2338b1f1abcdaa.png)

And thats the `openScreenShareMenu` event, triggers when someone press the share screen button:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/7/0/70521b0aeae8bbba6b3981aec030c34d2e231c56.png)

Thats the listener, tells us if the screenshare status has been changed, if it started then it shows the text `Sharing Screen`:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/7/2/721a480e4af00d5f4d9ee1630d90fffd9e51eea6.png)

I have added the `NotificationService.java` file and added the code in `MainActivity.kt`

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/8/d/8d6ddc7f9378e3e09a44fcfc734888045d4e08ab.png)  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/f/d/fd0d9c26727c4462c02e8c3a7139e0ed540e2761.png)

In the `NotificationService.java` s this `channel_id` looks correct to you? or it needs to be changed?

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/f/9/f9362116f95541d9394d6682ff73c78d1ccbaa60.png)

I am using these steps for iOS SDK:

> The app currently uses v1.10.11 of the iOS Zoom Video SDK and Zoom Screenshare SDK, which can be downloaded from the Zoom developer dashboard.
> 
> 1. After logging in, scroll to the bottom of the page and click “Account.”
> 2. On the left sidebar, click “Build App.”
> 3. In the “Download” section, select “iOS,” then download v1.10.11 of the SDK.
> 4. In the downloaded folder, under `zoom-video-sdk-iOS-1.10.11/Sample-Libs/lib`, copy the following folders into the Boundless app:
> 1. `ZoomVideoSDK.xcframework` into `mobile/ios`
> 2. `ZoomVideoSDKScreenShare.xcframework` into `mobile/ios`

Thats pretty much the basic structure for zoom video SDK for React Native.

Let me know what are your thoughts on it.

Outputs:  
Android User sharing screen:

 ![ImportedPhoto_1736347901605](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/0/a/0af00e5503a92d0edd3c2a59b935154f175925d1.jpeg)

Web User seeing what has been shared from the Android User:

 ![image_2025_01_09T14_35_01_542Z](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/5/8/58c4605a368cf758e312555b63f86918f3dfcf13.png)

---

<div class="post-metadata">

**Author:** ![rehema.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rehema.zoom/32/40323_2.png) [@rehema.zoom](https://devforum.zoom.us/u/rehema.zoom)\
**Post date:** [January 16, 2025, 9:11pm UTC](https://devforum.zoom.us/t/react-native-sharescreen-does-not-turn-on-screen-share/123818/13 "2025-01-16T21:11:21Z")

</div>

Hi @faiziqureshi2504 ,

Thank you for sharing. I just send you a private message to investigate further.

Thanks,  
Rehema

---

<div class="post-metadata">

**Author:** ![adityadeshmukh932](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/adityadeshmukh932/32/50483_2.png) [@adityadeshmukh932](https://devforum.zoom.us/u/adityadeshmukh932)\
**Post date:** [January 21, 2025, 12:41pm UTC](https://devforum.zoom.us/t/react-native-sharescreen-does-not-turn-on-screen-share/123818/14 "2025-01-21T12:41:05Z")

</div>

Can you please reply here ? I am facing same issue on android.

---

<div class="post-metadata">

**Author:** ![faiziqureshi2504](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/faiziqureshi2504/32/52233_2.png) [@faiziqureshi2504](https://devforum.zoom.us/u/faiziqureshi2504)\
**Post date:** [January 22, 2025, 7:02pm UTC](https://devforum.zoom.us/t/react-native-sharescreen-does-not-turn-on-screen-share/123818/15 "2025-01-22T19:02:20Z")

</div>

@adityadeshmukh932 I am still looking into this issue with @rehema.zoom . I will update here if we find anything.  
Let me know if you have already found the solution.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [February 2, 2025, 3:02pm UTC](https://devforum.zoom.us/t/react-native-sharescreen-does-not-turn-on-screen-share/123818/17 "2025-02-02T15:02:21Z")

</div>

This topic was automatically closed after 30 days. New replies are no longer allowed.
