diff -r 4d198a32ac7d -r d4809db37847 plugins/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C0ADE739-7F72-4D1D-85FC-631983AAE6D5.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C0ADE739-7F72-4D1D-85FC-631983AAE6D5.html Thu Aug 19 17:48:04 2010 -0700 @@ -0,0 +1,119 @@ + + +
Syntax:
+[int] sysinfo.networkregistrationstatus;+
Description:
+The networkregistrationstatus
property is an integer indicating the current network registration status.
The returned value can be one of the statuses listed in the following table.
+
+ Value + |
+ Description + |
---|---|
+ 0 + |
+
+ Registration status is unknown. + |
+
+ 1 + |
+
+ Not registered. The mobile device cannot detect any other networks and is not currently searching a new operator to register to. + |
+
+ 2 + |
+
+ Not registered. The mobile device can detect other networks on which it is possible to make emergency calls only. + |
+
+ 3 + |
+
+ Not registered, but the mobile device is currently searching for a new operator to register to. + |
+
+ 4 + |
+
+ Registered, network busy. + |
+
+ 5 + |
+
+ Registered on home network. + |
+
+ 6 + |
+
+ Registration denied. + |
+
+ 7 + |
+
+ Registered on visited network (roaming). + |
+
For more information on network connection related aspects that you should take into account in your widget, see Dealing with network issues.
+Example code:
+window.onload = function(){ + // Detect the current status + networkRegEventHandler(); +} +networkRegEventHandler() { + var textInfo = null; + var networkName = ""; + var status = sysinfo.networkregistrationstatus; + switch (status) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 6: + textInfo = "Network registration failed!"; + break; + case 5: + networkName = sysinfo.networkname; + textInfo ="Registered on home network named ); + break; + case 7: + networkName = sysinfo.networkname; + textInfo ="Registered on foreign network named ); + break; + default: + break; + } + alert(textInfo + networkname); +}+