开发者

RadioInfo.getCurrentNetworkName() giving a null value?

开发者 https://www.devze.com 2023-03-26 22:39 出处:网络
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 v

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.getCurrentNetwork开发者_Go百科Name(); } 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,


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?

0

精彩评论

暂无评论...
验证码 换一张
取 消