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:
Sender
is the instance of TSensor.Sensors
is a list of hardware sensors of theSender
type available on the device running your application. For example, with the OnSensorChoosing event of a location sensor, theSensors
parameter is a list of hardware sensors that can provide location information.ChoseSensorIndex
is 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.