Proximity Sensor

Last updated 26 days ago

The Proximity Sensor senses the proximity of an object relative to the view screen of a device, most commonly used to determine whether a handset is being held up to a person's ear

Detect an Object's Proximity to Phone

Event / Property



Indicates whether the proximity sensor is present on the device

Maximum Range (cm)

Reports the maximum range of the device's proximity sensor

Proximity Changed (distance (cm))

Called when distance (in cm) of the object to the device changes

Distance (cm)

Returns the distance from the object to the device (in cm)

Keep Running When on Pause

If 'true', will keep sensing for proximity changes even when the app is not visible


If 'true', the proximity sensor is enabled