When user press home button onStop() method is called and system takes screenshot which can be seen among open applications when user press and hold home button(on android phones). My question is how to prevent sensitive data to be visible to anybody who can take a phone and press and hold home button? Imagine, application(activity) presents a preview of secret document and user press home button(maybe somebody just approached to the user and he doesn't want to anybody see his secret document). However, anybody who takes a phone after that can press and hold home button and see some sensitive data.
I tried to hide view onPause and/or onStop but that doesn't work. So, how to remove current visible view before system takes screenshot after onStop?
Thanks.