I am trying to implement a security feature where applications' content cannot be viewed in the "Recent Applications" view. In that view, the thumbnail will show a black screen instead of the cached content of that application.
public class FlagSecureTestActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().setFlags(LayoutParams.FLAG_SECURE,
LayoutParams.FLAG_SECURE);
setContentView(R.layout.main);
}
}
and it works. However, this solution prevents screenshots from being taken while the user is using the application, and I would like to allow this functionality.
Hoping to find a solution that allows masking of content, and screenshots to be taken as well! Thank you!