Question by
naviln · Feb 26, 2020 at 08:08 AM ·
androidpausesecurityonapplicationfocus
using FLAG_SECURE (Android) in a unity project to hide sensitive content when app is suspended
I'de like to hide my app (prevent the android OS from taking a screenshot) when it is suspended/sent to the background.
From what I understand, I may need to implement FLAG_SECURE: https://stackoverflow.com/questions/9822076/how-do-i-prevent-android-taking-a-screenshot-when-my-app-goes-to-the-background
I'm just not sure on the steps to add that to a Unity Project. Could someone please assist?
Is there perhaps another way to hide sensitive content (or even render a frame before app is paused/unfocused as per my question here: https://answers.unity.com/questions/1702343/onapplicationfocus-on-android-render-an-extra-fram.html)
Thanks!
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612224005im_/https://answers.unity.com/themes/thub/images/avi.jpg)