Skip to main content

Proximity Monitor

Proximity Monitor

A Sensor able to detect the presence of nearby objects without any physical contact

To get started using it, you must use KmpProximity. To subscribe to changes to the device's proximity, we invoke the startListening function. We can then process the results in our app.


_3
KmpProximity.startListening {
_3
val isNearby = it // returns whether the proximity sensor has detected any contact
_3
}

To disable the proximity sensor, please use the following


_1
KmpProximity.stoplistening()

Any Setup Required?

None