Android : Unable to screenshot after using method

2019-07-16 13:45发布

问题:

Due to security reason, I would like to hide the content of the apps when it goes background.

Understand that using below method could done this job, but I would like to have the screenshot function still working.

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

Is there any workaround or other kind of method that could hide/blur the content of the apps when it goes background without compromise the screenshot function?