The Series 40 platform supports the Mobile Sensor API as specified in the feature description but with the following exceptions.
The Series 40 platform defines the following data properties for sensor channels:
Sensor |
Accuracy |
Data type |
Scale |
Unit |
Channel names |
---|---|---|---|---|---|
Accelerometer (SI values) |
0.1 |
|
0 |
m/s^2 |
|
Battery charge level |
0 |
|
0 |
% |
|
Charger state |
0 |
|
0 |
boolean |
|
Double tap |
0 |
|
0 |
int |
|
Network field intensity |
0 |
|
0 |
% |
|
Orientation |
0 |
|
0 |
unit |
|
The Series 40 platform defines the following measurement ranges for sensor channels:
Note: The values are specific to sensor device driver.
Sensor |
Channels |
Largest value |
Smallest value |
Resolution |
---|---|---|---|---|
Accelerometer (raw values) |
|
127 |
-128 |
1 |
Accelerometer (SI values) |
|
19.6133 |
-19.6133 |
0.15322890625 |
Battery charge level |
|
100 |
0 |
1 |
Charger state |
|
1 |
0 |
1 |
Network field intensity |
|
100 |
0 |
1 |
Orientation |
|
6 |
0 |
1 |
The double tap sensor supports only the following 3 return values:
SENSOR_SAPI_TAP_LEFT_RIGHT | 3 |
SENSOR_SAPI_TAP_TOP_BOTTOM | 12 |
SENSOR_SAPI_TAP_FRONT_BACK | 48 |
For more information about double tap sensor and receiving values from it, see How to receive input from the double tap sensor in the context of a game with Java ME.
For more information about the supported sensor channels, see Appendix E of the Mobile Sensor API specification.
The Series 40 platform supports the following
parameters for Connector.open
for opening a SensorConnection
:
Function |
<quantity> |
<contextType> |
<model> |
<location> |
---|---|---|---|---|
Accelerometer (raw values) |
|
|
|
|
Accelerometer (SI values) |
|
|
|
|
Battery charge level |
|
|
|
|
Charger state |
|
|
|
|
Double tap |
|
|
|
|
Network field intensity |
|
|
|
|
Orientation |
|
|
|
|
For a description of the terms, see section Finding and identifying sensors.
You
can also retrieve the above values during runtime by calling SensorManager.findSensors(null, null)
.
The Series 40 platform defines the following sensor properties:
Property |
Type |
Value |
---|---|---|
|
string |
See |
|
string |
Maximum sampling rate (in Hz) supported by the sensor on the device. Note: The orientation and double tap sensors do not support this property as neither uses a sampling rate. |
|
string |
|
|
string |
Supported API version on the device, for example |
On Series 40 devices, sensors are always available, push
MIDlets are not supported, and the maximum buffer size is 256. This
results in the following return values for SensorInfo
methods: