Archived:Obtaining the number of sensors on a device using Symbian C++
m (Hamishwillee -)
m (moved Archived:Obtaining the number of sensors on a Symbian device to Archived:Obtaining the number of sensors on a device using Symbian C++)
Latest revision as of 08:03, 6 August 2012
This snippet demonstrates how to obtain the number of available sensors on your device (for example, two on the Nokia N95 8GB: accelerometer sensor and rotation sensor).
Note: In order to use the code, you need to install the sensor plugin for your SDK.
The following libraries are required:
// Retrieve list of available sensors
// Get number of sensors available
TInt sensorCount = sensorList.Count();
CleanupStack::PopAndDestroy(); // sensorList
The number of available sensors is obtained.