Class ProximityDatum
The proximity sensor is usually used to determine how far away a person's head is
from the face of a handset device (for example, when a user is making or receiving
a phone call). Most proximity sensors return the absolute distance, in cm, but
some return only near and far values. The behavior of this probe differs on Android
and iOS, so be sure to read the relevant documentation for those probes.
Inheritance
System.Object
ProximityDatum
Assembly: SensusAndroid.dll
Syntax
public class ProximityDatum : Datum, IProximityDatum, IDatum
Constructors
ProximityDatum(DateTimeOffset, Double, Double)
Declaration
public ProximityDatum(DateTimeOffset timestamp, double distance, double maxDistance)
Parameters
Type |
Name |
Description |
System.DateTimeOffset |
timestamp |
|
System.Double |
distance |
|
System.Double |
maxDistance |
|
Properties
DisplayDetail
Declaration
public override string DisplayDetail { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
Distance
Most proximity sensors return the absolute distance, in cm,
but some return only near and far values.
Declaration
[DoubleProbeTriggerProperty]
[Anonymizable]
public double Distance { get; set; }
Property Value
Type |
Description |
System.Double |
|
MaxDistance
Declaration
[DoubleProbeTriggerProperty("Max. Distance")]
[Anonymizable]
public double MaxDistance { get; set; }
Property Value
Type |
Description |
System.Double |
|
StringPlaceholderValue
Gets the string placeholder value, which is the distance the phone is from an object
and the maximum distance that the phone reports. If the distance equals the
maximum distance then that is a sign that the phone only reports near and far and
doesn't report an accurate distance.
Declaration
public override object StringPlaceholderValue { get; }
Property Value
Type |
Description |
System.Object |
The string placeholder value.
|
Overrides
Methods
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
Implements