Class and interface description

The javax.microedition.sensor package is supported as specified in section Feature Description with following considerations:

SensorConnection

Only the following parameters are available for Connector.open for opening a SensorConnection in Nokia S60 devices:

Table 85: SensorConnection parameters

Function

<quantity>

<contextType>

<model>

<location>

Accelerometer, SI-values

acceleration

user

Nokia

NoLoc

Accelerometer, raw values

acceleration

user

Nokia2

NoLoc

Battery charge level

battery_charge

device

Nokia

device

Charger state

charger_state

device

Nokia

device

Network field intensity

network_field_intensity

device

Nokia

device

For a description of the terms, see section Finding and identifying sensors.

These values can be also found in runtime by calling SensorManager.findSensors( null, null ).

SensorInfo

In addition to the parameters shown in SensorConnection description, the following property values are defined:

Table 86: SensorInfo properties

Property name

Type

Value

PROP_LOCATION

String

see <location> in table SensorConnection parameters

PROP_VENDOR

String

Nokia

In S60 devices, sensors are always available, push MIDlets are not supported, and maximum buffer size is 256. This results in the following return values for SensorInfo methods:

Table 87: SensorInfo query methods

Method name

Type

Value

getMaxBufferSize

int

256

isAvailable

boolean

true

isAvailabilityPushSupported

boolean

false

isConditionPushSupported

boolean

false

ChannelInfo

Channel details for all sensors are defined as follows:

Table 88: ChannelInfo details

Sensor type

Accuracy

Data type

Scale

Unit

Channel names

Accelerometer, SI-values

0.1

TYPE_DOUBLE

0

m/s^2

  • axis_x

  • axis_y

  • axis_z

Accelerometer, raw values

0.1

TYPE_INT

0

raw

  • axis_x

  • axis_y

  • axis_z

Battery charge level

0.1429

TYPE_INT

0

%

battery_charge

Charger state

boolean

TYPE_INT

0

boolean

charger_state

Network field intensity

NoLoc

TYPE_INT

0

%

network_field_intensity

Each channel has one MeasurementRange, which is common to all channels. The MeasurementRanges are detailed as follows:

Table 89: Channel measurement ranges

Sensor type

Largest value

Smallest value

Resolution

Accelerometer, SI-values

19.62

-19.62

0.15328125

Accelerometer, raw values

127.0

-128.0

1.0

Battery charge level

100.0

0.0

14.29

Charger state

1.0

0.0

1.0

Network field intensity

100.0

0.0

1.0