The Mobile Sensor API for J2ME (JSR-256) allows you to develop MIDlets that use the input from embedded or external sensors.
The implementation of this API for the S60 platform contains all mandatory but none of the optional parts of the API reference.
The following sensors are available:
Accelerometer
Used to measure acceleration of the device on three different
axes (x
, y
and z
)
Can be used to measure acceleration of gravity to determine the orientation of the phone, or acceleration of movement of the phone
Returns output in two formats:
Raw (integer)
SI-acceleration values (m/s^2
, double)
Sampling rate is by default 40 Hz. Symbian C++ S60 applications can change the value, but Java MIDlets cannot. 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 phone
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 more than 100 Hz
The following optional features are not supported in the implementation of the Mobile Sensor API:
Control
s
(such as MeasurementRangeControl
, SampleRateControl
, StartControl
or StopControl
)
Push MIDlet support