I have successfully used this solution to prevent my app content from being displayed on the multitasking view. I have adapted it for Xamarin.
This is my current solution :
public class MyActivity : FragmentActivity
{
[...]
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
OverridePendingTransition(Resource.Animation.anim_in, Resource.Animation.anim_out);
Window.SetFlags(WindowManagerFlags.Secure, WindowManagerFlags.Secure);
}
[...]
}
This works well on recent devices.
My question is : How do I get a similar behaviour on devices prior to Android API 17?
The Android doc mentions this flag was added in API 17, but doesn't mention any workaround for older versions. I need to support down to Android 4.0.3 (API 15) ideally.