ActionScript Sensor Service API

The Sensor Service API is supported since Flash Lite Player 3.0 on S60 5th Edition devices.

The Sensor Service API allows Flash Lite applications to access data provided by the physical sensors of a device. The data from a given sensor is mapped to one or more sensor channels, which the API can listen to. The available sensors depend on the device. The API is integrated into Flash Lite through the Service object.

For an overview of the service and the API, see section Accessing data from the physical sensors of a device.

Using the Sensor Service API

To use the Sensor Service API, your Flash Lite application must first create a Service object for it. Use Service.Sensor to identify the service provider and ISensor to identify the supported interface:

var sensor = new Service("Service.Sensor", "ISensor");

This service object can then be used to access the services provided by the API: