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 10.1 Berlin | Samples and navigate to:
Object Pascal\Multi-Device Samples\Device Sensors and Services\SensorInfoCPP\Multi-Device Samples\Device Sensors and Services\SensorInfo
 - Subversion Repository:
- http://sourceforge.net/p/radstudiodemos/code/HEAD/tree/branches/RADStudio_Berlin/Object%20Pascal/Multi-Device%20Samples/Device%20Sensors%20and%20Services/SensorInfo
 - http://sourceforge.net/p/radstudiodemos/code/HEAD/tree/branches/RADStudio_Berlin/CPP/Multi-Device%20Samples/Device%20Sensors%20and%20Services/SensorInfo
 
 
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