Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 79
Registered: ‎09-15-2008
My Device: Not Specified
Accepted Solution

How to find Device is in Roaming

Hi,

 

I need to test if the coverage is Roaming.

 

I went through the thread:

 

http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=41137&query.id=82...

 

Which says

 

 

boolean isRoaming = (0 != (RadioInfo.getState() & RadioInfo.NETWORK_SERVICE_ROAMING));

 

I tested it on device and also emulator and both give me the value.

 

The RadioInfo.getState give "1"  and RadioInfo.NETWORK_SERVICE_ROAMING gives "8".

 

and thats the reason it retruning false.

 

When i check the manage connection option, it says that its on Roaming.

  I have Blackberry Pearl 8130 version 4.5.0.66 (CDMA)

 

 

 

Highlighted
Developer
Posts: 81
Registered: ‎07-16-2008
My Device: Curve - 8320
My Carrier: AirTel

Re: How to find Device is in Roaming

 You should use getNetworkService() instead of getState().

 

 

public boolean isOnRoaming() { boolean returnable = false; if (((RadioInfo.getNetworkService() & RadioInfo.NETWORK_SERVICE_ROAMING) != 0) || ((RadioInfo.getNetworkService() & RadioInfo.NETWORK_SERVICE_ROAMING_OFF_CAMPUS) != 0)) { returnable = true; } return returnable; }

 

 

 

*(Vipul)() ;