Skip to content

Repository files navigation

react-native-proximity-screen

A JS/TS Library to programatically turn the screen off using the proximity sensor.

Installation

npm install react-native-proximity-screen
# For older RN versions
react-native link react-native-proximity-screen

Basic Usage

import{startProximity,stopProximity}from'react-native-proximity-screen';import{useState,useEffect}from'react';// ...useEffect(()=>{if(incall){startProximity();}else{stopProximity();}},[]);

Docs

async startProximity(void)

async stopProximity(void)

Contributing

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

Special Thanks

License

MIT

About

An Android-only simple library to turn off screen on proximity.

Topics

Resources

Contributing

Stars

2 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages