Accessing and modifying system information

The SystemInfo Service API allows Flash Lite applications to access and modify system information on a device. System information is represented as a set of system attributes. You can use the SystemInfo Service to create Flash Lite applications that:

  • Read and modify system attribute values

  • Notify the user when system attribute values change

The system attributes are grouped into the following categories:

  • Battery

  • Connectivity

  • Device

  • Display

  • Features

  • General

  • Memory

  • Network

Only a few system attributes are modifiable and support change notifications. For more information about system attributes, see section System attributes

Accessing the API and supported methods

To create a service object for the SystemInfo Service API, use Service.SysInfo to identify the service provider and ISysInfo to identify the supported interface:

var sysInfo = new Service("Service.SysInfo", "ISysInfo");

The ISysInfo interface provides the following methods:

  • GetInfo()

    Use the GetInfo() method to retrieve information about a system attribute.

  • SetInfo()

    Use the SetInfo() method to modify the value of a system attribute.

  • GetNotification()

    Use the GetNotification() method to receive a notification when the value of a system attribute is changed.

  • Cancel()

    Use the Cancel() method to cancel an ongoing asynchronous call. This method is valid for any asynchronous call made through the SystemInfo Service API.