问题
I am using RadioInfo.getCurrentNetworkName() to get the operator name in the blackberry device. It is working fine since now when I noticed that for a given device, this function is returning a null value. The code used is the following:
String operator = "";
try { operator = RadioInfo.getCurrentNetworkName(); } catch (Exception ex) { }
Dialog.alert(operator);
The alert gives a null value. So i guess an exception is thrown when getting the network name. What can be the reason behind this?!
Thanks in advance,
回答1:
According to the API documentation getCurrentNetworkName() returns: The name of the carrier network, or null if the device is not registered on any network
Is the device in question provisioned on a cellular network?
来源:https://stackoverflow.com/questions/6981257/radioinfo-getcurrentnetworkname-giving-a-null-value