0.2.1 • Published 2 years ago

react-native-invoke-overlay v0.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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

FunctionPropsDescReturn
canDrawOverlaysNOReturn the permissions of device if can invoke from background or when locked screenPromise {inBackground: 'granted' or 'denied'; inLocked: 'granted' or 'denied'; canDrawOverlays: 'granted' or 'denied';}
openOverlaySettingNOOpen the setting overlay permission in android devicevoid
registerKeepAwakeScreenNOIn order to the invoke app when locked screen or background must register this functionPromise<boolean> if return false is already registered or started
removeKeepAwakeScreenOnNOTo 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 invokeAppPromise<boolean> if return false is already registered or removed
invokeAppYESInvoke App from background or app lock screenboolean 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

https://github.com/chanphiromsok/react-native-draw-overlay/assets/65760336/e65fa0dc-6868-48f8-b645-37961a33071f

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

0.2.1

2 years ago

0.2.0

2 years ago