New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-native-proximity-screen

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-proximity-screen

A lib to turn off screen with proximity sensor.

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

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

  • Javier González for the android base.

License

MIT

Keywords

react-native

FAQs

Package last updated on 20 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts