@exodus/react-native-screenshot-detector
TypeScript icon, indicating that this package has built-in type declarations

1.2.5 • Public • Published

@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()

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @exodus/react-native-screenshot-detector

      Weekly Downloads

      3,496

      Version

      1.2.5

      License

      MIT

      Unpacked Size

      25.8 kB

      Total Files

      14

      Last publish

      Collaborators

      • juraex
      • kevva
      • doguhan
      • janwe
      • yevhenii_molodyk
      • javiexodus
      • ismamz
      • exojo
      • feri42
      • jprichardson
      • farisissa
      • ryanzim
      • headfire
      • gutenye
      • mosesbot
      • roccomuso
      • dcastagnoli
      • sonaye
      • ves
      • tenaciousmv
      • asyakost
      • bulgakovk
      • chalker
      • andrejb
      • jaydp17
      • olistic
      • joepie91
      • merlz
      • vbonini
      • mol0d
      • devopsrobot
      • jenish-sojitra
      • markoexodus
      • nachoalvarez
      • giovannirco
      • filipexodus
      • cryptosgr
      • andrescarreon
      • diegomura
      • lanre-mark
      • sunilagrawal
      • guillecura
      • mariosvlad
      • federico-po
      • akinncar
      • fboucquez
      • lanahizzle
      • kwwood
      • umito
      • joshuabot
      • iaacek
      • meniem
      • skapala
      • awilson-rs
      • ggabarrin-rs
      • ralph.ba
      • danh.t.vo
      • voltagebots
      • ryansquared-npm
      • alexandrbbm
      • sergii_bo
      • florianmathieu
      • angelloz
      • exodus-justin.za
      • alex.alexandrius
      • rec
      • rg911
      • jamiemaw
      • james-gre
      • shehryar6
      • geoffreyrousset
      • clarkexo
      • tunguyennnnn
      • jschopen
      • cawfree
      • marcos.kichel
      • andrewtoth-exodus
      • cdotta-exodus
      • exorich
      • mmehta-10
      • kryptkeep
      • 633kh4ck
      • mbaraniak-exodus
      • jeehahn
      • hasakura
      • awesomeniko
      • davidexodus
      • r4vn
      • nantoaqui
      • exoleo
      • ale-exo
      • frankliexodus
      • bekatd
      • ronaldcrb
      • muratso
      • yalomist
      • joshua-rogers-exodus
      • jdmdreamer
      • vikas027
      • angel_exodus
      • sripwoud
      • coreycollins
      • xogdg
      • chrisrichexo
      • harshjv
      • josuexo
      • garana-exodus
      • kuchok