Skip to content

ShongSu/react-native-background-check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-background-check

NPM

For Android Only

Content

Installation

  1. Install
npm install react-native-background-check
  1. Link your native dependencies:
react-native link react-native-background-check
  1. Compile and have fun!

Usage

Include the library in your code:

import BackgroundCheckModule from 'react-native-background-check';

APIs:

alert(String: message)

Simple test function, call Android toast api.

openSettings()

Open Android Setting page.

bringApptoBackground()

Bring your app to Background, you'd better check if your app in foreground befroe you call it.

bringApptoForeground()

Bring your app to Foreground, you'd better check if your app in background befroe you call it.

lightScreen()

Set window flags to light your screen, and bring app over lock screen.

clearWindow()

Clear window flags you set in lightScreen()

Example React Native Android App

Working on it...

Questions?

Feel free to create an issue