Mobile sensors

The Mobile Sensor API allows MIDlets to fetch data from the sensors of a mobile device.

The Mobile Sensor API is supported on Nokia Asha and Series 40 software platform devices. For detailed information about platform support, see the implementation notes.

Different devices can have different sensors available. To find out which sensors are supported on a specific device, see Nokia Developer device specifications.

A sensor consists of one or more channels. A channel is an individual data measurement source. For example, the accelerometer sensor receives acceleration data from three channels, each of which is responsible for a single axis (x, y, z).

Sensors can be roughly divided into two types:

  • Sensors with a given range and accuracy for returned values, such as a sensor that measures the current network field intensity as a percentage value

  • Binary on/off indicators, such as a sensor that notifies whether the device is currently connected to a battery charger

All sensors have the following common properties:

  • Accuracy

  • Maximum value

  • Minimum value

For more information about the Mobile Sensor API, see:

For example MIDlets that show you how to use the Mobile Sensor API, see:

Glossary

The Mobile Sensor API uses the following terms when referring to sensor properties.

Table: Mobile Sensor API terms

Term

Description

Accuracy

Relative measurement error of the sensor channel as a percentage value. The returned value is between 0...1 where 0 is fully accurate.

Scale

The sensor unit scale as an exponent of ten. For example, the unit of meter and a scale of -3 generates millimeters.

Uncertainty

The estimated error in the measured data value. Uncertainty is given as the scale that is within one standard deviation of the measured value. Higher values signify higher uncertainty.

Unit

The unit of the returned value, usually in SI units.

Validity

A boolean that verifies that the measured data value has been received and that it is valid.