Packaging TeX Live For MSYS2

How to block Screenshot - Sketchware

Block a Screenshot


In this post I will tell how to block Screenshot in the app we create in Sketchware.

First, If you don't have Sketchware download it here.

Then create a new app in Sketchware.

Then, add a text view with some text.

Now, in the onCreate event of the Main activity, use an ASD( Add source directly) block and copy and paste the code from below.

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

Download the code and paste in the ASD block.
Then save and run the app.

Now try to take a screenshot in the app.

This code prevents the device from taking a screenshot.
It works...