How to disable screen recorder and screen shoret in zoom sdk

We use below methods to start Zoom Meeting-

JoinMeetingHelper.getInstance().joinMeetingWithNumber(this, meetingNo, “”);

But, this navigates to SDK and starts the meetinf, which is in a different Activity, and hence unable to block screen screenshot/recording.

So, require your help, so that we can have control on UI, which is used for live meeting, and hence we can control the live meeting hosting Activit

Hi webtraceliveclasses

Thanks for using Zoom SDK. You can define your own MeetingActivity, for example, MyMeetingActivity and inherit the SDK’s MeetingActivity like this:

public class MyMeetingActivity extends MeetingActivity

and then set the following in your config.xml(https://github.com/zoom/zoom-sdk-android/blob/master/mobilertc-android-studio/example2/src/main/res/values/config.xml#L4):

<string name="zm_config_conf_activity">MyMeetingActivity</string>

Then you can implement your own business logic or constraints (like blocking the screen short or screent recording) in MyMeetingActivity. You may refer to the implementation of example2 in our demo app:https://github.com/zoom/zoom-sdk-android/tree/master/mobilertc-android-studio/example2

Hope this helps. Thanks!

Your solution is not working… :@

Hi firebasestep,

Thanks for the reply. What is the issue you are facing? Could you provide more information?

Thanks!

I see you posted the same question here: Embed Zoom Video-Conferencing into Another Activity, I will reply over there and provide further assistance. Thx.

I am calling MyMeetingActiity from fragment… I have created config file, as u mentioned above, extended mymeetingactivity still when i clicks join meeting default screen opens of zoom sdk.

Hi iqbalbhabha,

Thanks for providing the screenshots. I see you only have the “MyMeetingActivity” in your config.xml, normally it is expecting a complete class path like this.is.java.package.MyMeetingActivity, otherwise the meeting activity could not be found. Please refer to the setting in our demo app:https://github.com/zoom/zoom-sdk-android/blob/master/mobilertc-android-studio/example2/src/main/res/values/config.xml#L4

Thanks!

1 Like

Glad to be helpful. Happy Zooming! :slight_smile:

hi,
i am a newbie here…i know nothing about programming.
even then i want the result of the above script.

please help me…i am hosting a tutorial and need help as fast as possible.

thanks

Hi @yashvudgirkar,

Thanks for using Zoom SDK. What is the script you are referring to? Are you facing any issues when using the SDK?

Thanks!

hi Zoom

I just wanted to block my fellow attendees not to take any screenshot of the meeting.
Please provide a complete procedure for it, if you can.

thanks!

Hi @yashvudgirkar,

If you are using Zoom default UI, you may follow the instruction I provided above(How to disable screen recorder and screen shoret in zoom sdk) to make the MeetingActivity available to be controlled. Then you could use the native Android methods to disable the abilities of screenshot like:

getWindow().setFlags(LayoutParams.FLAG_SECURE, LayoutParams.FLAG_SECURE);

You could also refer to the following links:

Thanks!

@carson.zoom
i have follow all the steps to disable screen record.

  1. Create your own activity, for example, MyMeetingActivity
  2. In config.xml , add the following:
<string name="zm_config_conf_activity">us.zoom.sdksample.MyMeetingActivity</string>
  1. Declare the Activity in your AndroidManifest.xml
  2. In your MyMeetingActivity class, extends MeetingActivity
  3. Add this line in onCreate method
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);

but when i join meeting from fragment using following code

it’s open default meeting activity and screen recoder also not disable.

Hi @dev.shivamjamaiwar,

Thanks for the reply. Could you provide a demo apk for us to further investigate?

Thanks!
Carson

Hey @carson.zoom,
Thanks for your reply. Currently i am facing another issue, When i join the meeting nothing will happen only notification show meeting in progress.

Hi @dev.shivamjamaiwar,

Thanks for the reply. Could you elaborate on the issue you are facing? Are you using Zoom default UI and extends the MeetingActivity as mentioned above? Could you provide the steps to reproduce this issue with our demo app?

Thanks!

@Carson_Chen thanks for your help :slight_smile:,

I have solved both issues.

Issue1: disable screen record not working.
actually i had done one mistake in below line, i am not entering <PACAKAGE_NAME> before path
<string name="zm_config_conf_activity">.view.activities.classroom.MyMeetingActivity</string>

i have added <PACKAGE_NAME> before path like below line
<string name="zm_config_conf_activity">PACKAGE_NAME.view.activities.classroom.MyMeetingActivity</string>
now it’s working.

Issue2: When i join the meeting nothing will happen only notification show.
if i add abiFilters in build.gradle(app) like below
debug {
ndk {
abiFilters ‘x86’, ‘armeabi’, ‘armeabi-v7a’, ‘arm64-v8a’
}
}
then this issue will occur, so i just remove any one of filter(either ‘armeabi-v7a’ or ‘arm64-v8a’) and it’s working.

I am using meeting sdk version 5.16.XX were config.xml is deleted. Is there any solution how to prevent screenshot and screen recording in the latest meeting sdk for both android and iOS?

I have tried that, here are the few sample
This is my MainActivity

package com.example.zoom_poc_3;

import androidx.appcompat.app.AppCompatActivity;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.Toast;

import us.zoom.sdk.*;

public class MainActivity extends AppCompatActivity {

    private Button btnJoin;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);
        initializeSdk(MainActivity.this);
        btnJoin = findViewById(R.id.btn);
        btnJoin.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                joinMeeting(MainActivity.this, "97448120538", "828130");
            }
        });
    }



    public void initializeSdk(Context context) {
        ZoomSDK sdk = ZoomSDK.getInstance();
        // TODO: For the purpose of this demo app, we are storing the JWT Token in the client app itself. However, you should not use hard-coded values for your JWT Token in your app in production.
        ZoomSDKInitParams params = new ZoomSDKInitParams();
        params.jwtToken = "" ; // I have given correct jwt as meeting was getting started
        params.domain = "zoom.us";
        params.enableLog = true;
        // TODO: Add functionality to this listener (e.g. logs for debugging)
        ZoomSDKInitializeListener listener = new ZoomSDKInitializeListener() {
            /**
             * @param errorCode {@link us.zoom.sdk.ZoomError#ZOOM_ERROR_SUCCESS} if the SDK has been initialized successfully.
             */
            @Override
            public void onZoomSDKInitializeResult(int errorCode, int internalErrorCode) {

            }
            @Override
            public void onZoomAuthIdentityExpired() { }
        };
        sdk.initialize(context, listener, params);
    }

    private void joinMeeting(Context context, String meetingNumber, String password) {
        MeetingService meetingService = ZoomSDK.getInstance().getMeetingService();
        JoinMeetingOptions options = new JoinMeetingOptions();
        JoinMeetingParams params = new JoinMeetingParams();
        params.displayName = "Vicky";
        params.meetingNo = meetingNumber;
        params.password = password;
        meetingService.joinMeetingWithParams(context, params, options);
    }
}

this is my main_activity.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

<Button
    android:id="@+id/btn"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerInParent="true"
    android:text="Join"/>
</RelativeLayout>

This is my POCACtivity with is extending NewMeetingAcitvity

package com.example.zoom_poc_3;

import android.os.Bundle;
import android.view.WindowManager;

import us.zoom.sdk.NewMeetingActivity;

public class POCActivity extends NewMeetingActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);
    }
}

This is my manifest file

 <activity
            android:name=".POCActivity"
            />
        <activity
            android:name=".MainActivity"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

This is my string.xml

<resources>
    <string name="app_name">zoom_poc_3</string>
    <string name="zm_config_conf_activity">.POCActivity</string>
</resources>

Even I have tried with

<string name="zm_config_conf_activity">com.example.zoom_poc_3.POCActivity</string>

I am using, 5.15.10 in android. Please lemme know if you have something for me.
Only challange in calling the POCActivity. it’s not getting called at all

@carson.zoom Can you please help me here