I need to keep my app in the recents menu, but blank the screen or "screenshot" when the app goes in the background. I've tried using
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
in the Activity onCreate() method before calling setContentView() but this doesn't work. The recents screen still always shows the app's content from the last time it was placed in the background in the recents menu.
Has something changed on Android? I scoured SO and Google on this subject and every article I found (most recently from 2018) devs seemed to portray that this solved their problem. I'd be happy to provide more information as needed.