Skip to content

emir57/capacitor-proximity-sensor

Repository files navigation

``

Capacitor Proximity Sensor

proximity-sensor

This Proximity Sensor API includes turning the screen on and off with the proximity sensor on the phone.

Platform Support

Ios Android Web
Availability ✔️

Installation

npm i proximity-sensor
npx cover synchronization

Android

This API requires the following permission to be added to your AndroidManifest.xml file:

<uses-permission android:name="android.permission.WAKE_LOCK"/>

API

activeProximitySensor() => Promise<proximityInfos>

Active proximity sensor

Returns: Promise

Since: 0.0.5


deActivateProximitySensor() => Promise<proximityInfos>

Deactivate proximity sensor

Returns: Promise

Since: 0.0.5


isActive() => Promise<proximityInfos>

Returns sensor active or deactive value

Returns: Promise

Since: 0.0.5


Interfaces

proximityInfos

Prop Type Description Since
isOpen boolean Returns whether the sensor is on or off 0.0.5

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published