How to load System Info Service Object in WRT - A generic approach

From Nokia Developer Wiki
Jump to: navigation, search

Article Metadata
Platform(s): S60 3rd Edition
Keywords: System Information Service (SysInfo)
Created: vasant21 (January, 4th, 2010)
Last edited: hamishwillee (24 Jun 2011)

  • There are some differences in WRT 1.0 and later version when we talk about using the systeminfo service object used to access a platform service. For eg: WRT 1.0 requires widgets to load the plug-in module explicitly by defining the following HTML code in their main HTML document:
<embed type="application/x-systeminfo-widget" hidden="yes"></embed>
  • While WRT 1.1 and later version provides an api for creating an object instance of a service interface.
nokia.device.load(interfaceName, version)

Loading Service Object - A Generic Way

  • Lets continue with the example case of systeminfo platform service
// so is declared as global variable
var so;
function load() {
// Lets check if running on WRT.
if ( typeof window.widget === 'undefined')
// Lets try getting SysInfo as ServiceObject
try {
so = window.device.getServiceObject("Service.SysInfo", "ISysInfo");
} catch (ex) {
// Embed SystemInfo plugin inside HTML For WRT 1.0.
so = document.createElement('embed');
so.setAttribute('type', 'application/x-systeminfo-widget');
This page was last modified on 24 June 2011, at 09:17.
35 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.