Classes and interfaces

The implementation supports the Mobile Sensor API as specified in the feature description but with the following exceptions.

ChannelInfo

The implementation defines the following data properties for sensor channels:

Table: Channel data properties

Sensor

Accuracy

Data type

Scale

Unit

Channel names

Accelerometer (raw values)

0.1

TYPE_INT

0

raw

axis_x

axis_y

axis_z

Accelerometer (SI values)

0.1

TYPE_DOUBLE

0

m/s^2

axis_x

axis_y

axis_z

Battery charge level

0

TYPE_INT

0

%

battery_charge

Charger state

0

TYPE_INT

0

boolean

charger_state

Double tap

0

TYPE_INT

0

int

double_tap

Network field intensity

0

TYPE_INT

0

%

network_field_intensity

Orientation

0

TYPE_INT

0

unit

orientation

The implementation defines the following measurement ranges for sensor channels:

Note: The values are specific to sensor device driver.

Table: Channel measurement ranges

Sensor

Channels

Largest value

Smallest value

Resolution

Accelerometer (raw values)

axis_x

axis_y

axis_z

127

-128

1

Accelerometer (SI values)

axis_x

axis_y

axis_z

19.6133

-19.6133

0.15322890625

Battery charge level

battery_charge

100

0

1

Charger state

charger_state

1

0

1

Network field intensity

network_field_intensity

100

0

1

Orientation

orientation

6

0

1

The double tap sensor supports only the following 3 return values:

Table: Double tap sensor 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.

SensorConnection

The implementation supports the following parameters for Connector.open for opening a SensorConnection:

Table: SensorConnection parameters

Function

<quantity>

<contextType>

<model>

<location>

Accelerometer (raw values)

acceleration

user

Nokia2

NoLoc

Accelerometer (SI values)

acceleration

user

Nokia

NoLoc

Battery charge level

battery_charge

device

Nokia

device

Charger state

charger_state

device

Nokia

device

Double tap

double_tap

device

Nokia

device

Network field intensity

network_field_intensity

device

Nokia

device

Orientation

orientation

device

Nokia

device

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).

SensorInfo

The implementation defines the following sensor properties:

Table: SensorInfo properties

Property

Type

Value

PROP_LOCATION

string

See <location> in table SensorConnection parameters in Series 40.

PROP_MAX_RATE

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.

PROP_VENDOR

string

Nokia

PROP_VERSION

string

Supported API version on the device, for example 1.2.

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:

Table: SensorInfo query methods

Method

Type

Value

getMaxBufferSize

int

256

isAvailable

boolean

true

isAvailabilityPushSupported

boolean

false

isConditionPushSupported

boolean

false