Code Monkey home page Code Monkey logo

react-native-invoke-overlay's Introduction

react-native-invoke-overlay

This package for invoke app while in lock screen app ,quite state,background and app killed (Android only)

Installation

npm install react-native-invoke-overlay

Usage

import { DrawOverlay,
        canDrawOverlays,
        openOverlaySetting,
        removeKeepAwakeScreenOn,
        registerKeepAwakeScreen ,
        invokeApp} from 'react-native-invoke-overlay';

Definition

Function Props Desc Return
canDrawOverlays NO Return the permissions of device if can invoke from background or when locked screen Promise {inBackground: 'granted' or 'denied'; inLocked: 'granted' or 'denied'; canDrawOverlays: 'granted' or 'denied';}
openOverlaySetting NO Open the setting overlay permission in android device void
registerKeepAwakeScreen NO In order to the invoke app when locked screen or background must register this function Promise<boolean> if return false is already registered or started
removeKeepAwakeScreenOn NO To stop invoke your app when locked screen but when screen is on it still invoke your app if you don't want to invoke when screen is on don't call invokeApp Promise<boolean> if return false is already registered or removed
invokeApp YES Invoke App from background or app lock screen boolean isScreenOn return true is screen on else if screen is locked return false

Example

You can check run clone repository and test from your own, I used firebase push message from background you can create project from firebase then download google-services.json after downloaded go to example/android/app and update it then test push.

Video

IMG_4320.MOV

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

react-native-invoke-overlay's People

Contributors

chanphiromsok avatar

Watchers

 avatar

react-native-invoke-overlay's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.