I want to hide my app (which has also floating services views) from screenshots and screen recordings, I tried with the following tag:
WindowManager.LayoutParams.FLAG_SECURE
It hides the app from the screen recording but shows a black rectangle on the service view, so I wonder what could be the approach to hide the app and services view from this recording without leaving a blank black rectangle?