(Difference between revisions)

Checking availability of WLAN feature in WRT

From Nokia Developer Wiki
Jump to: navigation, search
hamishwillee (Talk | contribs)
m (Hamishwillee - Bot change of template (Template:CodeSnippet) - now using Template:ArticleMetaData)
hamishwillee (Talk | contribs)
m (Hamishwillee - Fix categories)
Line 1: Line 1:
[[Category:Symbian Web Runtime]][[Category:Code Examples]][[Category:How To]][[Category:S60 5th Edition]][[Category:WLAN]]
|platform=S60 5th Edition
|platform=S60 5th Edition
|devices=Nokia 5800 XpressMusic
|devices=Nokia 5800 XpressMusic
Line 92: Line 90:
==Supplementary material==
==Supplementary material==
[[Category:Symbian Web Runtime]][[Category:Code Examples]][[Category:How To]][[Category:S60 5th Edition]]

Latest revision as of 05:22, 5 July 2012

Article Metadata
Tested with
Devices(s): Nokia 5800 XpressMusic
Platform(s): S60 5th Edition
S60 5th Edition
Platform Security
Capabilities: )
Keywords: device.getServiceObject(), Service.SysInfo, Service.SysInfo.GetInfo()
Created: kiran10182 (25 Dec 2008)
Last edited: hamishwillee (05 Jul 2012)


[edit] Overview

This code snippet checks whether WLAN feature is available in a device by using the SystemInfo Service API of the Web Runtime (WRT) 1.1.

Note: The SystemInfo Service API for WRT 1.1 is only available from S60 5th Edition onwards.

[edit] Source file: index.html

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<script type="text/javascript" src="basic.js"></script>
<script type="text/javascript" src="WRTKit/WRTKit.js"></script>
<style type="text/css">
@import url("basic.css");
<body onload="init()">

[edit] Source file: basic.js

var systemServiceObj = null;
// Called from the onload event handler to initialize the widget.
function init()
systemServiceObj = device.getServiceObject("Service.SysInfo", "ISysInfo");
catch (ex)
alert("System Service object cannot be found.");
// Feature Information
function isWLANAvailable()
// Initialize the criteria for the service object and obtain the
// information
var criteria = new Object();
criteria.Entity = "Features";
criteria.Key = "WLAN";
try {
var result = systemServiceObj.ISysInfo.GetInfo(criteria);
catch (ex)
alert("WLAN is available");
alert("WLAN is not available");

[edit] Postconditions

  • Displays whether WLAN feature is available or not in the device.

[edit] Supplementary material

This page was last modified on 5 July 2012, at 05:22.
58 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.