GetNetworkStatus
Returns a value indicating the network status of the phone (that is, whether there is a network registered and whether the phone is currently roaming).
|
Command |
Parameters |
Value Returned |
|---|---|---|
|
GetNetworkStatus |
None |
-1: The command is not supported. |
The following example assigns the status of the network connection to the networkstatus variable, and then uses a switch statement to update a text field with the status:
networkstatus = fscommand2("GetNetworkStatus");
switch(networkstatus) {
case -1:
_root.myText += "network status not supported" + "\n";
break;
case 0:
_root.myText += "no network registered" + "\n";
break;
case 1:
_root.myText += "on home network" + "\n";
break;
case 2:
_root.myText += "on extended home network" + "\n";
break;
case 3:
_root.myText += "roaming" + "\n";
break;
}