I have an app in android that I want to protect it's content when the app goes to background or mainly when the user pressed on the home button. If I go to switching between apps I can see a small thumbnail there of my current app screen, which I want to protect it with some blur or another screen.

I tried blurring, dimming, changing colour in the onPause event, but it always takes the screenshot thumbnail for the switch apps as it is.

Do you have any idea or approach on this matter?

有帮助吗?

解决方案

Have you tried disabling the thumbnail by adding FLAG_SECURE to your window on exiting?

getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top