06-08-2009 07:19 AM
Hi, we have an requriement that we need to check weather the device is in roaming or not using RIM api.
so any body can please help me in this, which piece of code will work to know weather device is in roaming or not using RIM api?
Solved! Go to Solution.
06-08-2009 07:30 AM
Have a look at this class net.rim.device.api.system.RadioInfo
there is one property NETWORK_SERVICE_ROAMING may be this will help you.
06-08-2009 08:31 AM
Hi, Thank you very much for your reply.
using that api when i'm trying to print, its printin value 8. so how do i'll come to know weather the device is in roaming or not and what i have to do when with that value 8?
Please let me know some piece of code so that will come to know weather the device is in roaming or not, as i'm very new to this RIM api.
06-08-2009 09:02 AM
You have to check bitmask returned by RadioInfo.getState(). For example this way:
boolean isRoaming = (0 != (RadioInfo.getState() & RadioInfo.NETWORK_SERVICE_ROAMING));
By the way, pay attenation that there are NETWORK_SERVICE_ROAMING and NETWORK_SERVICE_ROAMING_OFF_CAMPUS. I don't know what is the difference and whether either of them is what you need. All I know is the way how to check bit flag.