I mainly want to blank the screen in the recent apps list due to sensitive data being shown. For this, the solution is to use:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
but this also disallows screenshots, which is a problem.
Is there a way to show a blank screen (or a predefined image) in the recent apps list, while still allowing screenshots?
I think what you need is:
android:excludeFromRecents="true"
put that in your android manifest inside your <activity>(activity you want to exclude from recents)</activity>