This package has been deprecated

Author message:

Changing to org package @g01-tecnologia.

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

0.1.2 • Public • Published

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

Package Sidebar

Install

npm i react-native-proximity-screen

Weekly Downloads

326

Version

0.1.2

License

MIT

Unpacked Size

13.8 kB

Total Files

14

Last publish

Collaborators

  • douugbr