Skip to main content
Back to plugins
@capgo/capacitor-privacy-screen
Tutorial
by github.com/Cap-go

Privacy Screen

Protect app content in Android screenshots and obscure the iOS app switcher snapshot

Guide

Tutorial on Privacy Screen

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';

await PrivacyScreen.enable();

disable

Disables the privacy screen.

import { PrivacyScreen } from '@capgo/capacitor-privacy-screen';

await PrivacyScreen.disable();

isEnabled

Returns the current enabled state.

import { PrivacyScreen } from '@capgo/capacitor-privacy-screen';

await PrivacyScreen.isEnabled();

Full Reference