When the app is shown in the recents menu, I need to make the content blank, so that screenshots can not be taken. This flag works
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
and the screen becomes empty white. I need to handle the scenario where the user has selected the dark mode, and so the screen must be empty dark.
What other options can I have other than using this flag?
CodePudding user response:
Sorry, but you do not have control over how the OS displays your app in the overview screen, in terms of the color when FLAG_SECURE
is used.
CodePudding user response:
I have found this library on github that solves the problem.
https://github.com/nimblehq/recent-apps-thumbnail-hiding
You can use custom layout for the recent app views.