| ID | CS001282 | Creation date | January 26, 2009 |
| Platform | S60 5th Edition | Tested on devices | Nokia 5800 XpressMusic |
| Category | Flash Lite | Subcategory | System information |
| Keywords (APIs, classes, methods, functions): Service.SysInfo, sysInfo.GetInfo() |
This code snippet demonstrates how to check product information of the device using the SystemInfo Platform Service for Flash Lite supported from S60 5th Edition onwards.
// Import Platform Service Interface
import com.nokia.lib.Service;
// Heading of the application
heading_txt.text = "Checking Product Id (Firmware Version)";
// Create new Service object which has SystemInfo Service data
var sysInfo = new Service("Service.SysInfo", "ISysInfo");
// Define input parameters
var inParams = {Entity:"Device", Key:"FirmwareVersion"};
// Retrieve information about a system attribute with a synchronous call
// Define result value
var outParams = sysInfo.GetInfo(inParams);
if (outParams.ErrorCode == 0) {
var systemData = outParams.ReturnValue;
var firmware = systemData.StringData;
text_txt.text = "Firmware version:\r"+firmware;
} else {
var errorId = outParam.ErrorCode;
text_txt.text = "Error: "+errorId;
}
All firmware details including the product name are displayed.
The following sample application has been tested in the Nokia 5800 XpressMusic (S60 5th Edition, Flash Lite 3.0).
File:FlashLite Checking Product Info.zip
No related wiki articles found