@exodus/react-native-screenshot-detector
v1.1.2 react-native
@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()
npm i @exodus/react-native-screenshot-detector
Metadata
- MIT
- Whatever
- gcarling
- released 1/5/2023
Downloads
Maintainers
james-gre, juraex, exorich, richayotte, ralph.ba, angelloz, joshuabot, jamiemaw, exodus-justin.za, javiexodus, wcastr, brandon-exodus, rg911, alex.alexandrius, filipexodus, ryansquared-npm, andrescarreon, florianmathieu, dwolfgram, eox42, iamsaikranthi, janwe, fosterdill, eduardoexodus, fboucquez, skapala, umito, lanahizzle, iaacek, nafisholeh, ariene-exodus, ps.mcnally, akinncar, matias.la, voltagebots, kwwood, sergii_bo, mongkuen, philipcr, jacobbr22, lekzd, cdotta, alexandrbbm, danh.t.vo, ezenwankwogabriel, meniem, mzndako, kevva, aaronloexodus, feri42, jprichardson, farisissa, ryanzim, headfire, gutenye, mosesbot, roccomuso, dcastagnoli, sonaye, nareg_exodus, ves, tenaciousmv, asyakost, bulgakovk, chalker, andrejb, jaydp17, olistic, joepie91, merlz, jadechip, vbonini, devopsrobot, jenish-sojitra, unidwell, nachoalvarez, giovannirco, rec, dncabal, diegomura, lanre-mark, sunilagrawal, guillecura, mariosvlad, federico-po, pagan404,