Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
# react-native-background-secure
permit block screen
Android Only

Allow you hide the screen when your app goes to background mode.
## Installation

```sh
npm install react-native-background-secure
or
yarn add react-native-background-secure
```

## Usage

```js
import { multiply } from "react-native-background-secure";
import { AppState } from 'react-native';
import { blockScreen, unblockScreen } from "react-native-background-secure";

// ...

const result = await multiply(3, 7);
const subscriptionFocus = AppState.addEventListener('focus', () => {
unblockScreen();
});

const subscriptionBlur = AppState.addEventListener('blur', () => {
blockScreen();
});
```

## Contributing
Expand Down