What is called after Share screen is selected?

Hopefully someone can point me in the right direction. I’m looking for what code is called when Share screen is selected from the share option menu. I wan to bypass the menu completely, start sharing the screen and go directly into a take photo intent. If someone can point me to the file and line in the example I would greatly appreciate it. I though I had it tracked down when I call the call th ShareComponent but while the other party gets a notification that I’ve started sharing the image they see is just black. This is how I"m calling ShareComponent

val shareComponent: ShareComponent = ShareComponent(this)

shareComponent.processShareRequest( 1013,-1,takePictureIntent)

Thanks in advance for pointing me in the right direction.

Hi jack,

Thanks for the post. The ShareComponent is not a public available SDK class so we do not recommend using it. If you would like to modify the content when you start sharing your screen, you may do the following:

  1. In your config.xml file, add the following(You may define your own class name):
<!-- share custom screen handler class. It must implement com.zipow.videobox.util.IShareCustomScreenHandler -->
    <string name="zm_config_share_custom_screen_handler">us.zoom.sdkexample.MyShareCustomScreenHandler</string>
  1. Then create a new class, for example, call MyShareCustomScreenHandler, then implements the IShareCustomScreenHandler. You will need to implement the onStartedShareCustomScreen method and the getShareCustomScreenName method, when the screen sharing session starts, these 2 methods will be triggered, you may implement the event/action that you would like to share in these callbacks:
public class MyShareCustomScreenHandler implements IShareCustomScreenHandler {
    @Override
    public void onStartedShareCustomScreen(Context context) {


    }

    @Override
    public String getShareCustomScreenName(Context context) {
        return null;
    }
}

Hope this helps. Thanks!

Sorry to revive this dead topic but this project got put on hold for a while and I"m just now getting back to it. Can you point me to any documentation or examples of how to use these methods? I"m able to hit getShareCustomScreenName but I’m not sure what I should have it return. I’ve got the code the launch my take picture intent in OnStartedShareCustomScreen but it never gets hit.

Hi jack,

Thanks for the reply. I revisited your requirement in your original post, just want to confirm: Do you want to open the “take photo/camera” intent when sharing a screen? It might not be very feasible since the camera would have been occupied by the video in the meeting.

The callback getShareCustomScreenName is for the string/text “Screen” after you press the share button, you may return any string to rename the “screen” term shown in the action list.

Hope this helps. Thanks!

Returning the string to add to the list was the piece I was missing. My code is now working thanks.

Hi jack,

Glad to hear that it is working. Let me know if you have any other questions. Happy Zooming!