npm.io
1.0.0 • Published 5 years ago

capacitor-privacy-screen

Licence
MIT
Version
1.0.0
Deps
0
Size
24.2 MB
Vulns
0
Weekly
0
Stars
103
DeprecatedThis package is deprecated

capacitor-privacy-screen

️ Capacitor plugin that protects your app from displaying a screenshot in Recents screen/App Switcher.

Installation

npm install capacitor-privacy-screen
npx cap sync

On iOS, no further steps are needed.

On Android, register the plugin in your main activity:

import dev.robingenz.capacitor.privacyscreen.PrivacyScreen;

public class MainActivity extends BridgeActivity {
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Initializes the Bridge
    this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
      // Additional plugins you've installed go here
      // Ex: add(TotallyAwesomePlugin.class);
      add(PrivacyScreen.class);
    }});
  }
}

Configuration

No configuration required for this plugin.

Usage

The plugin only needs to be installed.

Keywords