Our Android app may present sensitive data and we wish to hide it when the app is not in use - Android is taking a snapshot of the app and displays it in the overview screen. At the same time we want to enable the user to take screen shots of the app when using it. We already checked following options:
- Using FLAG_SECURE - Answers the need to hide the app in the overview screen but completely blocks the user from taking any screen shot of the app
- Using onPause to change the activity content. Specifically we tried to show there the splash screen. We do see the splash screen appears when the app is minimizing, but the thumbnail presents the app before the splash appeared, meaning this is too late.
Any idea how we can hide/change the activity before the app moves to the background and still keep the print screen ability when the user is using the app?
Here are some links about the issue - all are only partial to this question:
- How do I prevent Android taking a screenshot when my app goes to the background?
- Hide a view before onStop?
Thanks!