1.0.2 • Published 4 years ago

react-native-phone-locked-action v1.0.2

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

react-native-phone-locked-action

Getting started

yarn add react-native-phone-locked-action

or

$ npm install react-native-phone-locked-action --save

Usage

import { NativeEventEmitter, NativeModules } from 'react-native';
import PhoneLocked from 'react-native-phone-locked-action';

const App: () => React$Node = () => {

  const eventEmitter = new NativeEventEmitter(NativeModules.PhoneLocked);

  eventEmitter.addListener('EventReminder', (res) => {
    console.log(res.action); // ACTION_USER_PRESENT || ACTION_SCREEN_OFF || ACTION_SCREEN_ON
  });

  return (
    <>

    </>
  );
};