System.Sensors.Components.TLocationSensor
Delphi
TLocationSensor = class (TSensor<TCustomLocationSensor>)
C++
class PASCALIMPLEMENTATION TLocationSensor : public TSensor__1<System::Sensors::TCustomLocationSensor*>
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
class | public | System.Sensors.Components.pas System.Sensors.Components.hpp |
System.Sensors.Components | System.Sensors.Components |
Description
TLocationSensor is a wrapper for TCustomLocationSensor.
The Optimize property offers the possibility to turn on or off the optimization of the location sensor.
Accuracy represents the level of precision by which the sensor locates the device geographically, relative to the geographical point at which the device is actually located.
Distance is the minimum distance by which the device must move in order to make the location sensor relocate the device and return new location information.
TLocationSensor offers the possibility to interact with the list of regions in the current location with AddRegion, RemoveRegion and ClearRegions methods.
If your application uses TLocationSensor, before you deploy your final application you should select Project > Options > Version Info and update the values of NSLocationAlwaysUsageDescription
and NSLocationWhenInUseUsageDescription
with a message that explains why your application is asking for the user location. Your users see this message when your application asks them to authorize iOS to provide the location of the iOS device to your application.
See Also
- Mobile Tutorial: Using Location Sensors (iOS and Android)
- System.Sensors.TCustomSensor
- System.Sensors.TCustomLocationSensor
- System.Sensors.Components.TLocationSensor.Optimize
- System.Sensors.Components.TLocationSensor.Accuracy
- System.Sensors.Components.TLocationSensor.Distance
- System.Sensors.Components.TLocationSensor.AddRegion
- System.Sensors.Components.TLocationSensor.RemoveRegion
- System.Sensors.Components.TLocationSensor.ClearRegions
- Mobile Code Snippets
Code Examples
- SensorInfo sample
- Location sample
- VCL Sensors sample