networkregistrationstatus

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.

Table: Values returned by networkregistrationstatus

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);
}