FMX.SensorInfo Sample
This is a sample that illustrates how to get device sensor info in mobile applications, using FireMonkey.
Contents
Location
You can find the FireMonkeyMobile SensorInfo sample project at:
- Start | Programs | Embarcadero RAD Studio Alexandria | Samples and navigate to:
Object Pascal\Multi-Device Samples\Device Sensors and Services\SensorInfo
CPP\Multi-Device Samples\Device Sensors and Services\SensorInfo
- Subversion Repository:
- You can find Delphi and C++ code samples in GitHub Repositories. Search by name into the samples repositories according to your RAD Studio version.
Description
This demo shows interaction with a mobile device sensor.
How to Use the Sample
- Navigate to the one of the locations given above, and open:
- Delphi: SensorInfo.dproj
- C++: SensorInfo.cbproj
- Press F9 or choose Run > Run.
Classes
FireMonkey SensorInfo represents the main window of the sample. It contains the following components:
Implementation
- The application creates a list of Sensors and populates the TListBox.
- The information about the Sensors is shown in the list:
- TCustomBiometricSensor and its Properties
- TCustomElectricalSensor and its Properties
- TCustomEnvironmentalSensor and its Properties
- TCustomLightSensor and its Properties
- TCustomLocationSensor and its Properties
- TCustomMechanicalSensor and its Properties
- TCustomMotionSensor and its Properties
- TCustomOrientationSensor and its Properties
- TCustomScannerSensor and its Properties
Uses
- System.Sensors.TCustomSensor
- System.Sensors.TCustomBiometricSensor
- System.Sensors.TCustomElectricalSensor
- System.Sensors.TCustomEnvironmentalSensor
- System.Sensors.TCustomLightSensor
- System.Sensors.TCustomLocationSensor
- System.Sensors.TCustomMechanicalSensor
- System.Sensors.TCustomMotionSensor
- System.Sensors.TCustomOrientationSensor
- System.Sensors.TCustomScannerSensor
- FMX.ListBox.TListBox
- FMX.Types.TTimer
- FMX.StdCtrls.TLabel
- FMX.StdCtrls.TButton
See Also
- FireMonkey Application Design
- FireMonkey
- iOS Mobile Application Development
- Troubleshooting: Cannot Deploy to the iOS Simulator
- Troubleshooting: Cannot Deploy to the iOS Device
Samples
- FireMonkey Orientation Sensor sample
- VCL Sensors sample