RadioInfo.getCurrentNetworkName() giving a null value?

大兔子大兔子 提交于 2019-12-13 06:29:28

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!