Socket
Socket
Sign inDemoInstall

@exodus/react-native-screenshot-detector

Package Overview
Dependencies
Maintainers
86
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@exodus/react-native-screenshot-detector

detect when the user takes a screenshot


Version published
Maintainers
86
Created
Source

@exodus/react-native-screenshot-detector

NOTE: forked and adapted from https://github.com/blend/react-native-screenshot-detector

The goal is to prevent the user from taking screenshots in your app.

  • Android: possible via the FLAG_SECURE flag
  • iOS: impossible, but you can detect them

Accordingly, this library exports different APIs for Android and iOS. See Usage below.

Getting started

$ npm install @exodus/react-native-screenshot-detector --save

$ react-native link @exodus/react-native-screenshot-detector

Usage

import ScreenshotDetector from '@exodus/react-native-screenshot-detector';

// iOS
ScreenshotDetector.subscribe(() => {
  // yell at the user. We'll leave the choice of obscenities to you
})

// Android
ScreenshotDetector.disableScreenshots()
ScreenshotDetector.enableScreenshots()

Keywords

FAQs

Package last updated on 05 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc