Android: hide application content in multitasking mode

Does anyone know how to hide the contents of your application when a user enters the current application manager? Similarly, the link explains for ios: http://pinkstone.co.uk/how-to-control-the-preview-screenshot-in-the-ios-multitasking-switcher/

Thank!

+4
source share
2 answers

Somehow android: excludeFromRecents = "true" did not work for me .. although I read that it should have.

However, using this in your activity will do the trick: getWindow (). setFlags (LayoutParams.FLAG_SECURE, LayoutParams.FLAG_SECURE);

Thanks for your answers to CommonWare and NavjotSingh

+3

Android

 android:excludeFromRecents="true"
0

Source: https://habr.com/ru/post/1660865/


All Articles