[BREAKGLASS] Append-only mirror of github.com/bluewallet/react-native-obscure
Go to file
Marcos Rodriguez Vélez f4b83b4a26
Update build.gradle
2021-07-02 12:33:08 -04:00
android Update build.gradle 2021-07-02 12:33:08 -04:00
.gitattributes Initial commit. 2017-12-18 03:17:59 -06:00
.gitignore Updated package.json 2017-12-18 04:00:16 -06:00
index.js Fixed name error 2017-12-18 04:29:48 -06:00
LICENSE Initial commit 2017-12-18 03:18:38 -06:00
package.json Update package.json 2021-07-01 20:48:12 -04:00
README.md upgrades 2019-09-09 12:58:04 +03:00

react-native-obscure

NOTICE

This fork updates RN to 0.60.5, build tools 28.


A react native android module for obscuring applications when switching applications and preventing taking screenshots of the application.

Getting started

NPM

$ npm install @talaikis/react-native-obscure --save

Yarn

$ yarn add react-native-obscure

Installation

Mostly automatic installation

Nothing to do.

Usage

You can use it programmatically for activating/deactivating the obscuring at any time, use it app-wide or per component.

activateObscure: Activates the obscuring.

deactivateObscure: Deactivate the obscuring.

import React, { Component } from 'react';
import { View, Text } from 'react-native';

import Obscure from 'react-native-obscure';

export default class App extends Component {
  componentWillMount() {
    Obscure.activateObscure();
  }

  componentWillUnmount() {
    Obscure.deactivateObscure();
  }

  render() {
    return(
      <View>
        <Text>This text will be obscured when changing apps</Text>
      </View>
    );
  }
}

TODOs

  • Add iOS support.