System.Sensors.Components.TSensor.OnSensorChoosing
Delphi
property OnSensorChoosing: TOnSensorChoosing read FOnSensorChoosing write FOnSensorChoosing;
C++
__property TOnSensorChoosing OnSensorChoosing = {read=FOnSensorChoosing, write=FOnSensorChoosing};
Properties
| Type | Visibility | Source | Unit | Parent |
|---|---|---|---|---|
| event | published | System.Sensors.Components.pas System.Sensors.Components.hpp |
System.Sensors.Components | TSensor |
Description
Occurs when the underlying platform provides a list of hardware sensors of this TSensor instance type.
When you enable an instance of TSensor, this instance requests a list of running sensors of a specific type (the type of the TSensor instance). When the underlying platform returns this list, OnSensorChoosing is triggered to let you choose which specific sensor you want to use in your instance of TSensor.
This event provides the following arguments to its event handler:
Senderis the instance of TSensor.Sensorsis a list of hardware sensors of theSendertype available on the device running your application. For example, with the OnSensorChoosing event of a location sensor, theSensorsparameter is a list of hardware sensors that can provide location information.ChoseSensorIndexis the index of a sensor in the list of hardware sensors. Change this parameter to the index of the sensor that you want to use. The first sensor in the list of hardware sensors is used by default.