# Screen share not working with SDK 29

**URL:** <https://devforum.zoom.us/t/screen-share-not-working-with-sdk-29/5994>\
**Category:** Android\
**Created:** [September 23, 2019, 12:43pm UTC](https://devforum.zoom.us/t/screen-share-not-working-with-sdk-29/5994 "2019-09-23T12:43:11Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![jack](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@jack](https://devforum.zoom.us/u/jack)\
**Post date:** [September 23, 2019, 12:43pm UTC](https://devforum.zoom.us/t/screen-share-not-working-with-sdk-29/5994/1 "2019-09-23T12:43:11Z")

</div>

When using the latest version of the Zoom SDK on Android SDK 29 screen sharing isn’t working. All that displays is a black screen. The same code on Android SDK 28 works without issue.

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [September 23, 2019, 5:01pm UTC](https://devforum.zoom.us/t/screen-share-not-working-with-sdk-29/5994/2 "2019-09-23T17:01:18Z")

</div>

Hi jack,

Thanks for the post. I tried to reproduce this issue using Android SDK 29 with our demo app and I am able to do screen sharing. Are you getting any errors? Could you share your log so we can further investigate in this? Are you able to reproduce this with our demo app?

Thanks!

---

<div class="post-metadata">

**Author:** ![jack](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@jack](https://devforum.zoom.us/u/jack)\
**Post date:** [September 27, 2019, 12:28pm UTC](https://devforum.zoom.us/t/screen-share-not-working-with-sdk-29/5994/3 "2019-09-27T12:28:13Z")

</div>

Sorry for the late reply. I’m not seeing anything in the logs. I tried to reproduce in the demo app and the demo app is working. I’ll keep digging to see if I can figure out what’s different between my app and the demo app.

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [September 27, 2019, 5:39pm UTC](https://devforum.zoom.us/t/screen-share-not-working-with-sdk-29/5994/4 "2019-09-27T17:39:12Z")

</div>

Hi Jack,

Thanks for the reply. Sure, let me know if you have any questions, we are here to help. 😃

Thanks!

---

<div class="post-metadata">

**Author:** ![jaibhuvaneshwari.pet](https://avatars.discourse-cdn.com/v4/letter/j/cdc98d/32.png) [@jaibhuvaneshwari.pet](https://devforum.zoom.us/u/jaibhuvaneshwari.pet)\
**Post date:** [August 21, 2020, 3:30pm UTC](https://devforum.zoom.us/t/screen-share-not-working-with-sdk-29/5994/5 "2020-08-21T15:30:30Z")

</div>

Hello ,  
Even I am facing issue with screen share. I am using custom ui.  
Scenario :  
First time screenshare is working for me . Once i logout and log in or internet disconnected and reconnect my screenshare is blacked out . During this black out i am not receiving “onShareUserReceivingStatus” callback. but receiving only onShareActiveUsercallback. not sure whether this is related to the issue. but for the headup i have mentoned here. Kindly help me out asap.

Code snippet:  
//adding listener on create  
ZoomSDK.getInstance().inMeetingService.inMeetingShareController.addListener(this)

// override fun onShareActiveUser(shareUserId: Long) {  
if (shareUserId == -1L) {  
removeScreenShareVideo()  
}else{  
addScreenShareVideo()  
}  
}  
fun addScreenShareVideo(){  
val renderInfo = MobileRTCVideoUnitRenderInfo(0, 0, 100, 100)  
var screenShareMobileRTCVideoView: MobileRTCVideoView? = MobileRTCVideoView(activity)  
screenShareMobileRTCVideoView!!.getVideoViewManager().removeAllVideoUnits()  
var screenShareVideoViewMgr: MobileRTCVideoViewManager? = screenShareMobileRTCVideoView?.getVideoViewManager()  
if (screenShareVideoViewMgr != null) {  
Log.d(TAG, “adding screenshare”)  
screenShareVideoViewMgr?.addShareVideoUnit(inMeetingService?.activeShareUserID()!!, renderInfo)  
videoView.removeAllViews()  
videoView.addView(screenShareMobileRTCVideoView)  
screenShareMobileRTCVideoView?.onResume()  
}  
fun removeScreenShareVideo()  
{  
if (screenShareVideoViewMgr != null) {  
screenShareVideoViewMgr?.removeShareVideoUnit()  
screenShareVideoViewMgr?.removeAllVideoUnits()  
}  
}  
//removing listener on destroy  
ZoomSDK.getInstance().inMeetingService.inMeetingShareController.removeListener(this)

Thanks

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [August 21, 2020, 6:41pm UTC](https://devforum.zoom.us/t/screen-share-not-working-with-sdk-29/5994/6 "2020-08-21T18:41:20Z")

</div>

Hi @jaibhuvaneshwari.pet, sorry to hear you’re running into this issue with screensharing. I’ve tried reproducing in the demo app, but did not see any issues. My steps taken were:

1. Join meeting with number/password
2. Share screen
3. Stop sharing
4. Turn off network connection
5. Reconnect
6. Attempt to share screen again

Both screen shares were successful with this flow. I was unable to reproduce using both the custom UI and the default UI in our demo app. Can you confirm that these steps are correct?

Thanks!

---

<div class="post-metadata">

**Author:** ![jaibhuvaneshwari.pet](https://avatars.discourse-cdn.com/v4/letter/j/cdc98d/32.png) [@jaibhuvaneshwari.pet](https://devforum.zoom.us/u/jaibhuvaneshwari.pet)\
**Post date:** [August 24, 2020, 10:44am UTC](https://devforum.zoom.us/t/screen-share-not-working-with-sdk-29/5994/7 "2020-08-24T10:44:25Z")

</div>

@jon.zoom Thanks for your reply.  
Even i am not facing this issue in sample app.  
Actually my use case is different. I will not share screen from my android mobile.  
I will be just view the others screen who has shared in my mobile.  
I am not using MobileRTCShareView instead i am using MobileRTCView itself to show the shared screen.  
Could you please redirect to your technical team.

Thanks ,  
Jai

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [August 24, 2020, 8:57pm UTC](https://devforum.zoom.us/t/screen-share-not-working-with-sdk-29/5994/8 "2020-08-24T20:57:06Z")

</div>

Hi @jaibhuvaneshwari.pet, thank you for clarifying. I have some follow-up questions to better understand your use case before I am able to assist you.

> Actually my use case is different. I will not share screen from my android mobile.  
> I will be just view the others screen who has shared in my mobile.

Are you performing the previously mentioned steps (disconnecting/reconnecting) on the mobile device or on the device that is sharing?

> I am not using MobileRTCShareView instead i am using MobileRTCView itself to show the shared screen.

Can you please provide some code from your implementation displaying how you’re setting up this view and responding to the screnshare callbacks?

Thanks!

---

<div class="post-metadata">

**Author:** ![jaibhuvaneshwari.pet](https://avatars.discourse-cdn.com/v4/letter/j/cdc98d/32.png) [@jaibhuvaneshwari.pet](https://devforum.zoom.us/u/jaibhuvaneshwari.pet)\
**Post date:** [August 25, 2020, 8:41am UTC](https://devforum.zoom.us/t/screen-share-not-working-with-sdk-29/5994/9 "2020-08-25T08:41:05Z")

</div>

“Are you performing the previously mentioned steps (disconnecting/reconnecting) on the mobile device or on the device that is sharing?”

for the above question , I am disconnecting and reconnecting from the mobile device where i am just **viewing** the screen share. I am not sharing from this device.

“Can you please provide some code from your implementation displaying how you’re setting up this view and responding to the screnshare callbacks?”  
Code snippet:  
//adding listener on create  
ZoomSDK.getInstance().inMeetingService.inMeetingShareController.addListener(this)

// override fun onShareActiveUser(shareUserId: Long) {  
if (shareUserId == -1L) {  
removeScreenShareVideo()  
}else{  
addScreenShareVideo()  
}  
}  
fun addScreenShareVideo(){  
val renderInfo = MobileRTCVideoUnitRenderInfo(0, 0, 100, 100)  
var screenShareMobileRTCVideoView: MobileRTCVideoView? = MobileRTCVideoView(activity)  
screenShareMobileRTCVideoView!!.getVideoViewManager().removeAllVideoUnits()  
var screenShareVideoViewMgr: MobileRTCVideoViewManager? = screenShareMobileRTCVideoView?.getVideoViewManager()  
if (screenShareVideoViewMgr != null) {  
Log.d(TAG, “adding screenshare”)  
screenShareVideoViewMgr?.addShareVideoUnit(inMeetingService?.activeShareUserID()!!, renderInfo)  
videoView.removeAllViews()  
videoView.addView(screenShareMobileRTCVideoView)  
screenShareMobileRTCVideoView?.onResume()  
}  
fun removeScreenShareVideo()  
{  
if (screenShareVideoViewMgr != null) {  
screenShareVideoViewMgr?.removeShareVideoUnit()  
screenShareVideoViewMgr?.removeAllVideoUnits()  
}  
}  
//removing listener on destroy  
ZoomSDK.getInstance().inMeetingService.inMeetingShareController.removeListener(this)

@jon.zoom Kindly let me know if i am missing or doing something in a wrong way.

Thanks.

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [August 25, 2020, 7:38pm UTC](https://devforum.zoom.us/t/screen-share-not-working-with-sdk-29/5994/10 "2020-08-25T19:38:55Z")

</div>

@jaibhuvaneshwari.pet, thank you for providing that.

You mentioned in an earlier post that you’re seeing `onShareActiveUser` called during this, but not `onShareUserReceivingStatus`. How many times are you seeing `onShareActiveUser` called **after** you disconnect/reconnect? And can you confirm that `onShareUserReceivingStatus` is calling during the initial share, but never called again after reconnecting?

Thanks!

---

<div class="post-metadata">

**Author:** ![aryacg18](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@aryacg18](https://devforum.zoom.us/u/aryacg18)\
**Post date:** [May 18, 2023, 8:47am UTC](https://devforum.zoom.us/t/screen-share-not-working-with-sdk-29/5994/11 "2023-05-18T08:47:45Z")

</div>

MeetingService meetingService1 = ZoomSDK.getInstance().getMeetingService();  
JoinMeetingOptions options = new JoinMeetingOptions();  
options.no\_invite = true;  
options.no\_audio=true;  
options.no\_video=true;  
options.no\_bottom\_toolbar = true;  
options.no\_dial\_in\_via\_phone = true;  
options.no\_dial\_out\_to\_phone = true;

```
            //meetingService.addListener(meetingServiceListener);

            JoinMeetingParams params1 = new JoinMeetingParams();
            //params.displayName = "User Name";
            params1.meetingNo = "81572630729";
            params1.password = "vhtTBa";
            meetingService1.joinMeetingWithParams(MainActivity.this, params1, options);
            //InMeetingService inMeetingService = ZoomSDK.getInstance().getInMeetingService();
            meetingService1.addListener(new MeetingServiceListener() {

                @Override
                public void onMeetingStatusChanged(MeetingStatus meetingStatus, int i, int i1) {
                    switch (meetingStatus) {
                        case MEETING_STATUS_CONNECTING:
                            // Meeting is connecting
                            break;
                        case MEETING_STATUS_INMEETING: {

```

// InMeetingService inMeetingService = ZoomSDK.getInstance().getInMeetingService();  
// InMeetingShareController shareController = inMeetingService.getInMeetingShareController();  
MediaProjectionManager manager = (MediaProjectionManager) getSystemService(Context.MEDIA\_PROJECTION\_SERVICE);  
if (manager != null) {

```
                                Intent screenCaptureIntent = manager.createScreenCaptureIntent();
                                //startActivityForResult(screenCaptureIntent,REQUEST_SCREEN_CAPTURE_PERMISSION);
                                inMeetingService = ZoomSDK.getInstance().getInMeetingService();
                               shareController = inMeetingService.getInMeetingShareController();
                                shareController.startShareScreenSession(screenCaptureIntent);

                            }
                   i have problems in this code for share screen.

```
