Android prohibits screen recording and screenshots

When we are watching some wonderful pictures or live broadcasts, sometimes we want to take a screenshot or record the screen, but we will be prompted that the screenshot cannot be taken, and the video is also black. How does that happen? It is actually a simple line of code:

getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);

 

Guess you like

Origin blog.csdn.net/guodashen007/article/details/113843704