Android Behavior
Questo contenuto non è ancora disponibile nella tua lingua.
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.