The Mobile Sensor API allows MIDlets to fetch data from the sensors of a mobile device.
For instructions on using the Mobile Sensor API in your MIDlet, see section Mobile sensors.
The Series 40 platform supports the mandatory part of the API specification:
The Series 40 platform supports the following sensors:
Accelerometer
Used to measure the acceleration of the device along three axes (x, y, z)
Can be used to determine the orientation of the device or the acceleration of movement of the device
Returns output in SI (double) format
Sampling rate depends on the device. To check the sampling
rate, call SensorInfo.getProperty(SensorInfo.PROP_MAX_RATE)
.
Battery charge level sensor
Used to measure the current battery charge level of the device
Sampling rate is 2 Hz
Charger state sensor
Used to check whether the device has been connected to a battery charger
Sampling rate is 2 Hz
Double tap sensor
Used to detect if the device is double-tapped and from which direction
Sampling rate is not supported
Network field intensity sensor
Used to measure the intensity of the currently used cellular network signal
Sampling rate is 2 Hz
Orientation sensor
Used to detect the orientation of the device
Sampling rate is not supported
The Symbian platform supports the mandatory part of the API specification:
The Symbian platform supports the following sensors:
Accelerometer
Used to measure the acceleration of the device along three axes (x, y, z)
Can be used to measure the acceleration of gravity to determine the orientation of the device, or the acceleration of movement of the device
Returns output in two formats:
Raw (integer)
SI acceleration values (m/s^2, double)
Sampling rate is 40 Hz by default. Symbian C++ applications can change the value, but MIDlets can not. If the sampling rate is changed, the MIDlet is notified only by the rate of accumulated measurement values.
Battery charge level sensor
Used to measure the current battery charge level of the device
Sampling rate is 10 Hz
Charger state sensor
Used to check whether the device has been connected to a battery charger
Sampling rate is 10 Hz
Network field intensity sensor
Used to measure the intensity of the currently used cellular network signal
Sampling rate is greater than 100 Hz
The Series 40 platform does not support the optional part of the API specification:
The Series 40 platform does not support the following features for the API:
ObjectCondition
(this class is implemented
as a stub, meaning that you can instantiate it, but it provides no
functionality)
The Symbian platform does not support the optional part of the API specification:
The Symbian platform does not support the following features for the API: