Android Behavior
Copy a setup prompt with the install steps and the full markdown guide for this plugin.
How Android protection works
Section titled “How Android protection works”On Android, the plugin applies WindowManager.LayoutParams.FLAG_SECURE to the activity window.
That protects your app from:
- screenshots
- screen recordings in most normal capture paths
- the recent apps thumbnail preview
No extra Android manifest or Gradle configuration is required after installation and cap sync.
Runtime control
Section titled “Runtime control”import { PrivacyScreen } from '@capgo/capacitor-privacy-screen';
await PrivacyScreen.disable();
// Allow a temporary flow where capture is acceptable.
await PrivacyScreen.enable();Important note
Section titled “Important note”FLAG_SECURE is an Android platform feature. If you disable the plugin, users and other apps can capture your content again until you re-enable it.
Keep going from Android Behavior
Section titled “Keep going from Android Behavior”If you are using Android Behavior to plan security and compliance, connect it with Using @capgo/capacitor-privacy-screen for the native capability in Using @capgo/capacitor-privacy-screen, Encryption for the implementation detail in Encryption, Compliance for the implementation detail in Compliance, Capgo Security Scanner for the product workflow in Capgo Security Scanner, and Capgo Security for the product workflow in Capgo Security.