From Xojo Documentation

Property (As Boolean )
aDeviceData.ProximityMonitoringEnabled = newBooleanValue
BooleanValue = aDeviceData.ProximityMonitoringEnabled

New in 2020r2

Supported for all project types and targets.

If True, the operating system will update the app to indicate if the device is near the user or not.


To conserve battery power, set this property to true only when you need to check to see if the device is near the user or not and then immediately set it to [[false] so that the device stops using energy to deliver this data to your app.

Sample Code

If the device is near the user, display a message:

If System.Device.IsProximityNear Then
MessageBox("The device is close to you.")
End If

See Also

IsProximityNear property.