Using @capgo/capacitor-privacy-screen
Capacitor API for protecting app content from the app switcher preview.
Install
bun add @capgo/capacitor-privacy-screen
bunx cap sync
What This Plugin Exposes
enable- Enables the privacy screen.disable- Disables the privacy screen.isEnabled- Returns the current enabled state.
Example Usage
enable
Enables the privacy screen.
import { PrivacyScreen } from '@capgo/capacitor-privacy-screen';
const result = await PrivacyScreen.enable();
console.log(result);
disable
Disables the privacy screen.
import { PrivacyScreen } from '@capgo/capacitor-privacy-screen';
const result = await PrivacyScreen.disable();
console.log(result);
isEnabled
Returns the current enabled state.
import { PrivacyScreen } from '@capgo/capacitor-privacy-screen';
const result = await PrivacyScreen.isEnabled();
console.log(result);
Full Reference
- GitHub: https://github.com/Cap-go/capacitor-privacy-screen/
- Docs: /docs/plugins/privacy-screen/
Keep going from Using @capgo/capacitor-privacy-screen
If you are using Using @capgo/capacitor-privacy-screen to plan security and compliance, connect it with @capgo/capacitor-privacy-screen for the implementation detail in @capgo/capacitor-privacy-screen, Getting Started for the implementation detail in Getting Started, Encryption for the implementation detail in Encryption, Compliance for the implementation detail in Compliance, and Capgo Security Scanner for the product workflow in Capgo Security Scanner.