All Projects → williambout → React Native Proximity

williambout / React Native Proximity

Licence: mit
📱 A React Native wrapper that provides access to the proximity sensor on iOS and Android.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to React Native Proximity

Sensor Data Logger
Android Wear sensor data plotter
Stars: ✭ 166 (-17.41%)
Mutual labels:  sensor
Mcpicker Ios
McPicker is a customizable, closure driven UIPickerView drop-in solution with animations that is rotation ready.
Stars: ✭ 186 (-7.46%)
Mutual labels:  iphone
I2c Moisture Sensor
I2C based soil moisture sensor
Stars: ✭ 194 (-3.48%)
Mutual labels:  sensor
Bh1750
An Arduino library for the digital light sensor breakout boards containing the BH1750FVI IC
Stars: ✭ 173 (-13.93%)
Mutual labels:  sensor
Newsapp
NewsApp
Stars: ✭ 183 (-8.96%)
Mutual labels:  iphone
Iboot64helper
IDAPython loader to help with AArch64 iBoot, iBEC, and SecureROM reverse engineering
Stars: ✭ 189 (-5.97%)
Mutual labels:  iphone
Angular Web Bluetooth
The missing Web Bluetooth module for Angular
Stars: ✭ 164 (-18.41%)
Mutual labels:  sensor
Obs Ios Camera Source
Use your iPhone camera as a video source in OBS Studio and stream high quality video from your iPhone's camera over USB
Stars: ✭ 199 (-1%)
Mutual labels:  iphone
Openssl For Iphone
A script for compiling OpenSSL for iOS Devices (iPhone, iPad, iPod Touch, AppleTV, MacCatalyst)
Stars: ✭ 2,190 (+989.55%)
Mutual labels:  iphone
Iio Sensor Proxy
IIO accelerometer sensor to input device proxy
Stars: ✭ 192 (-4.48%)
Mutual labels:  sensor
Home Assistant Config Fr
🏠Configuration de Home Assistant en français. 👨🏻‍💻 N'hésitez pas à ⭐ mon repo et à copier les bonnes idées ! 🇨🇵
Stars: ✭ 175 (-12.94%)
Mutual labels:  sensor
Openbrushvr
Unity VR & AR Painting in 3d space for the Vive and Tango and ARKit
Stars: ✭ 180 (-10.45%)
Mutual labels:  iphone
Gwda
WebDriverAgent ( iOS ) Client Library in Golang
Stars: ✭ 191 (-4.98%)
Mutual labels:  iphone
Iphone Inline Video
📱 Make videos playable inline on the iPhone (prevents automatic fullscreen)
Stars: ✭ 2,020 (+904.98%)
Mutual labels:  iphone
Micropython Fusion
Sensor fusion calculating yaw, pitch and roll from the outputs of motion tracking devices
Stars: ✭ 194 (-3.48%)
Mutual labels:  sensor
Bme680 Python
Python library for the BME680 gas, temperature, humidity and pressure sensor.
Stars: ✭ 167 (-16.92%)
Mutual labels:  sensor
Battery State Card
Battery state card for Home Assistant
Stars: ✭ 184 (-8.46%)
Mutual labels:  sensor
Gravity View
Introducing Gravity View: Because swiping is so yesterday!
Stars: ✭ 200 (-0.5%)
Mutual labels:  sensor
Onewirehub
OneWire slave device emulator
Stars: ✭ 195 (-2.99%)
Mutual labels:  sensor
Cppandroidiosexample
An application example using the same C++ code on both an Android project and an iPhone project.
Stars: ✭ 191 (-4.98%)
Mutual labels:  iphone

npm version

react-native-proximity

A React Native wrapper that provides access to the state of the proximity sensor for iOS and Android.

Usage of react-native-proximity and scrollview.

Getting Started

  • Install the library
npm install --save react-native-proximity
  • Link the library
react-native link react-native-proximity

Usage

Import the library

import Proximity from 'react-native-proximity';

addListener(callback)

The callback function returns an object with proximity and distance properties. If proximity is true, it means the device is close to an physical object. distance is only supported in Android.

componentDidMount(){
 Proximity.addListener(this._proximityListener);
},

/**
 * State of proximity sensor
 * @param {object} data
 */
 _proximityListener(data) {
   this.setState({
     proximity: data.proximity,
     distance: data.distance // Android-only 
   });
 },

removeListener(callback)

componentWillUnmount() {
  Proximity.removeListener(this._proximityListener);
},
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].