Mobile Sensor API (JSR-256) is an optional API that allows MIDlets to fetch data from sensors on a mobile device.
Mobile Sensor API is supported in the Symbian platform with clarifications detailed in Mobile Sensor API Implementation Notes. The API was first included on selected S60 3rd Edition FP 2 devices and S60 5th Edition (Java Runtime 1.4) devices. From Symbian^3 onwards, all devices include support for the API.
Different devices based on the Symbian platform may have different sensors available. To find out whether the chosen device supports the required sensors, see Device Specifications at Forum Nokia web site.
A sensor consists of one or more channels. A channel is an individual
data measurement source. For example, an accelerometer sensor receives
acceleration data from three channels, each of which is responsible
for a single axis (x
, y
and 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:
Maximum value
Minimum value
Accuracy
The Mobile Sensor API uses the following terms when referring to sensor properties:
Term |
Description |
---|---|
The unit of the returned value, usually in SI units. |
|
The sensor unit scale as an exponent of ten. For example,
unit of meter and scale of |
|
A boolean that verifies that the measured data value has been received and that it is valid. |
|
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. |
|
Relative measurement error of the sensor channel as a percentage
value. The returned value is between |