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
prabhu_mp_99
Posts: 93
Registered: ‎08-17-2009
My Device: Not Specified

To find SIM network connection?

Hello,

 

I am trying to get the API to find out the BB phone has active SIM connection or not, but couldn't get it yet. I want to find in my application whether the phone has active SIM connection or not programmatically. Could somenone guide me which API should i use to find this?

 

Thank you.

Please use plain text.
Developer
Rajat_10Sep
Posts: 696
Registered: ‎12-02-2008
My Device: Not Specified

Re: To find SIM network connection?

Hi,

 

You can have a look at this class

 

net.rim.device.api.system.RadioInfo

Regards,
Rajat Gupta.
--------------------------------------------------------------------------------
If your problem was get solved then please mark the thread as "Accepted solution" and kudos - your wish
Please use plain text.
Developer
prabhu_mp_99
Posts: 93
Registered: ‎08-17-2009
My Device: Not Specified

Re: To find SIM network connection?

Hi,

 

I have made a function like below to find out this. It worked as expected. Thanks Rajat.

 

public boolean findSIMConnectionCoverage()
    {
        if ( RadioInfo.getState() != RadioInfo.STATE_OFF && ( RadioInfo.getNetworkService() & RadioInfo.NETWORK_SERVICE_DATA ) != 0 )
            return true;
            
        return false;
    }

 

 

Please use plain text.