react-native-mo-screen
TypeScript icon, indicating that this package has built-in type declarations

0.1.7 • Public • Published

react-native-mo-screen

Provides screen-on, proximity and brightness support

Installation

Install just like your ordinary react-native module.

Usage

Please check the example/ code.

import { Screen, ProximityScreenOffLock, ScreenOnLock } from 'react-native-mo-screen';

const lock = Screen.pushScreenOn();
// do something
lock.release();

const lock = Screen.pushProximityScreenOff();
// do something
lock.release();

Screen.setScreenBrightness(0.5);

return (
  <View>
    <ScreenOnLock />
    <ProximityScreenOffLock />
  </View>
)

TODO

  • keep screen on only while in foreground?

Readme

Keywords

none

Package Sidebar

Install

npm i react-native-mo-screen

Weekly Downloads

3

Version

0.1.7

License

MIT

Unpacked Size

54.4 kB

Total Files

21

Last publish

Collaborators

  • mm22