# Block the user from taking screenshot or screen recording using any 3rd party app

**URL:** <https://devforum.zoom.us/t/block-the-user-from-taking-screenshot-or-screen-recording-using-any-3rd-party-app/66916>\
**Category:** Android\
**Created:** [April 4, 2022, 3:08am UTC](https://devforum.zoom.us/t/block-the-user-from-taking-screenshot-or-screen-recording-using-any-3rd-party-app/66916 "2022-04-04T03:08:42Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![anand3450](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/anand3450/32/35316_2.png) [@anand3450](https://devforum.zoom.us/u/anand3450)\
**Post date:** [April 4, 2022, 3:08am UTC](https://devforum.zoom.us/t/block-the-user-from-taking-screenshot-or-screen-recording-using-any-3rd-party-app/66916/1 "2022-04-04T03:08:42Z")

</div>

Description  
When the user is attending the zoom session, he can take screenshot or record the session using third party app

- 

Steps to reproduce the behavior:  
I have integrated the Zoom meeting sdk in my Android app.  
When the user joins a meeting via the zoom meeting sdk, then screen shot or screen share can be taken without the speaker consent using any 3rd party screen recorder say XRecorder.

Although I have declared getWindow().setFlags(WindowManager.LayoutParams.FLAG\_SECURE, WindowManager.LayoutParams.FLAG\_SECURE);

Since it happens in Zoom sdk in a separate window, I am unable to control it.  
Kindly help me iresolving the issue

Smartphone information  
Any smartphone with Android 9 and above

---

<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:** [April 4, 2022, 7:26pm UTC](https://devforum.zoom.us/t/block-the-user-from-taking-screenshot-or-screen-recording-using-any-3rd-party-app/66916/2 "2022-04-04T19:26:27Z")

</div>

Hi @anand3450,

Are you using the default UI provided by the SDK? If so, you should be able to do this by [extending the MeetingActivity](https://zoomdevelopersupport.zendesk.com/hc/en-us/articles/360056165831-How-to-Extend-the-MeetingActivity).

Thanks!

---

<div class="post-metadata">

**Author:** ![anand3450](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/anand3450/32/35316_2.png) [@anand3450](https://devforum.zoom.us/u/anand3450)\
**Post date:** [April 5, 2022, 5:45am UTC](https://devforum.zoom.us/t/block-the-user-from-taking-screenshot-or-screen-recording-using-any-3rd-party-app/66916/3 "2022-04-05T05:45:24Z")

</div>

I am getting the following error message after extending MeetingActivity  
java.lang.AssertionError  
at com.zipow.videobox.util.PreferenceUtil.initialize(SourceFile:1)  
at com.zipow.videobox.x.a.b.a(SourceFile:10)  
at com.zipow.videobox.ConfActivity.onCreate(SourceFile:2)  
at com.zipow.videobox.d.onCreate(SourceFile:1)  
at com.zipow.videobox.ConfActivityNormal.onCreate(SourceFile:7)  
at us.zoom.sdk.MeetingActivity.onCreate(SourceFile:1)  
at android.app.Activity.performCreate(Activity.java:8151)  
at android.app.Activity.performCreate(Activity.java:8135)  
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)  
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3715)  
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3914)  
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)  
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)  
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)  
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2339)  
at android.os.Handler.dispatchMessage(Handler.java:106)  
at android.os.Looper.loop(Looper.java:258)  
at android.app.ActivityThread.main(ActivityThread.java:8219)  
at java.lang.reflect.Method.invoke(Native Method)  
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:632)  
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049)

I am using the latest ZoomMeeting sdk ie 5.10.1.5.184

---

<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:** [April 5, 2022, 8:16pm UTC](https://devforum.zoom.us/t/block-the-user-from-taking-screenshot-or-screen-recording-using-any-3rd-party-app/66916/4 "2022-04-05T20:16:32Z")

</div>

Hi @anand3450,

Can you please provide the full stack trace for the exception you’re seeing? It looks like this is only part of it.

Thanks!

---

<div class="post-metadata">

**Author:** ![jainvishal258](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jainvishal258/32/34339_2.png) [@jainvishal258](https://devforum.zoom.us/u/jainvishal258)\
**Post date:** [April 6, 2022, 6:11am UTC](https://devforum.zoom.us/t/block-the-user-from-taking-screenshot-or-screen-recording-using-any-3rd-party-app/66916/5 "2022-04-06T06:11:16Z")

</div>

Can you please provide an example on how to disable screen shots inside zoom live meeting. We are using android zoom sdk version ‘zoom-sdk-android-5.10.1.5184’

The solution you provided to extend meetingActivity leads to lots of errors and doubts.

It would be very generous of zoom community to help me.

Looking forward for a solution.  
Thanks in advance.

---

<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:** [April 6, 2022, 5:58pm UTC](https://devforum.zoom.us/t/block-the-user-from-taking-screenshot-or-screen-recording-using-any-3rd-party-app/66916/6 "2022-04-06T17:58:30Z")

</div>

Hi @jainvishal258,

Unfortunately we do not currently have any documentation on how to implement this. Can you please provide some additional context around the specific errors you are seeing?

Thanks!

---

<div class="post-metadata">

**Author:** ![anand3450](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/anand3450/32/35316_2.png) [@anand3450](https://devforum.zoom.us/u/anand3450)\
**Post date:** [April 8, 2022, 11:47am UTC](https://devforum.zoom.us/t/block-the-user-from-taking-screenshot-or-screen-recording-using-any-3rd-party-app/66916/7 "2022-04-08T11:47:45Z")

</div>

In Android  
public class ZoomMeetActivity extends MeetingActivity {  
public static final String TAG = “ZoomMeetActivity”;

```
@Override
protected void onCreate(Bundle bundle) {
    super.onCreate(bundle);
    setContentView(R.layout.activity_zoom_meet);
    Log.d(TAG,"Inside onCreate ");
}

```

}

When I run the app, The code "Inside onCreate " is not called.

In Logcat I am getting error as  
java.lang.AssertionError  
at com.zipow.videobox.util.PreferenceUtil.initialize(SourceFile:1)  
at com.zipow.videobox.x.a.b.a(SourceFile:10)  
at com.zipow.videobox.ConfActivity.onCreate(SourceFile:2)  
at com.zipow.videobox.d.onCreate(SourceFile:1)  
at com.zipow.videobox.ConfActivityNormal.onCreate(SourceFile:7)  
at us.zoom.sdk.MeetingActivity.onCreate(SourceFile:1)  
at android.app.Activity.performCreate(Activity.java:8151)  
at android.app.Activity.performCreate(Activity.java:8135)  
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)  
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3715)  
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3914)  
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)  
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)  
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)  
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2339)  
at android.os.Handler.dispatchMessage(Handler.java:106)  
at android.os.Looper.loop(Looper.java:258)  
at android.app.ActivityThread.main(ActivityThread.java:8219)  
at java.lang.reflect.Method.invoke(Native Method)  
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:632)  
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049)

---

<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:** [April 8, 2022, 9:20pm UTC](https://devforum.zoom.us/t/block-the-user-from-taking-screenshot-or-screen-recording-using-any-3rd-party-app/66916/8 "2022-04-08T21:20:28Z")

</div>

Hi @anand3450,

It’s difficult to tell for sure without full context of the error, but this may be due to the fact that you are calling `setContentView`. When you extend the `MeetingActivity`, the SDK still creates and maintains its own UI, so trying to set this on the Activity can cause several issues. Can you try removing that line and see if you’re still seeing a crash?

Thanks!

---

<div class="post-metadata">

**Author:** ![anand3450](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/anand3450/32/35316_2.png) [@anand3450](https://devforum.zoom.us/u/anand3450)\
**Post date:** [April 11, 2022, 6:11am UTC](https://devforum.zoom.us/t/block-the-user-from-taking-screenshot-or-screen-recording-using-any-3rd-party-app/66916/9 "2022-04-11T06:11:51Z")

</div>

In Android  
public class ZoomMeetActivity extends MeetingActivity {

}

Logcat:

AndroidRuntime: FATAL EXCEPTION: main  
Process: com.learn.allendigital, PID: 20006  
java.lang.AssertionError  
at com.zipow.videobox.util.PreferenceUtil.initialize(PreferenceUtil.java:1)  
at com.zipow.videobox.x.a.b.a(ZmMeetingUIHelper.java:10)  
at com.zipow.videobox.ConfActivity.onCreate(ConfActivity.java:2)  
at com.zipow.videobox.d.onCreate(ConfAccessibilityActivity.java:1)  
at com.zipow.videobox.ConfActivityNormal.onCreate(ConfActivityNormal.java:7)  
at us.zoom.sdk.MeetingActivity.onCreate(MeetingActivity.java:1)  
at com.learn.allendigital.ZoomMeetActivity.onCreate(ZoomMeetActivity.java:12)  
at android.app.Activity.performCreate(Activity.java:8151)  
at android.app.Activity.performCreate(Activity.java:8135)  
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)  
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3715)  
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3914)  
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)  
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)  
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)  
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2339)  
at android.os.Handler.dispatchMessage(Handler.java:106)  
at android.os.Looper.loop(Looper.java:258)  
at android.app.ActivityThread.main(ActivityThread.java:8219)  
at java.lang.reflect.Method.invoke(Native Method)  
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:632)  
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049)

Although I have only MeetingActivity, but still I am getting the error .

---

<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:** [April 11, 2022, 10:51pm UTC](https://devforum.zoom.us/t/block-the-user-from-taking-screenshot-or-screen-recording-using-any-3rd-party-app/66916/10 "2022-04-11T22:51:34Z")

</div>

Hi @anand3450,

Can you please check the suggestion on my previous reply and let me know if that changes anything?

Thanks!

---

<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:** [May 12, 2022, 8:51am UTC](https://devforum.zoom.us/t/block-the-user-from-taking-screenshot-or-screen-recording-using-any-3rd-party-app/66916/11 "2022-05-12T08:51:59Z")

</div>

Closed on May 12, 2022, 8:51am UTC

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