Socket
Socket
Sign inDemoInstall

react-native-flag-secure

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-flag-secure

A simple module used to add FLAG_SECURE to the main activity. FLAG_SECURE prevents the users and the app to take screenshots of the app content.


Version published
Weekly downloads
5
decreased by-64.29%
Maintainers
1
Install size
13.7 kB
Created
Weekly downloads
 

Readme

Source

react-native-flag-secure-android

A simple module used to add FLAG_SECURE to the main activity. FLAG_SECURE prevents the users and the app to take screenshots of the app content.

Manual Install

  1. Open up `android/app/src/main/java/[...]/MainApplication.java (React Native 0.29+)
  • Add import com.idmuvunyi.flagsecure.FlagSecurePackage; to the imports at the top of the file
  • Add new FlagSecurePackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:

    include ':react-native-flag-secure-android'
    project(':react-native-flag-secure-android').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-flag-secure-android/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:

    implementation project(':react-native-flag-secure-android')
    

Usage

import FlagSecure from "react-native-flag-secure-android";

function flagSecure(enable) {
  if (enable) {
    FlagSecure.activate();
  } else {
    FlagSecure.deactivate();
  }
}

Notes

Please note that this module is an adpation of the react-native-keep-awake module.

FAQs

Last updated on 23 Jan 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc