From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

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.