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
Highlighted
Developer
Posts: 242
Registered: ‎02-19-2013
My Device: 9500
My Carrier: _

How to enable wifi internet programatically

[ Edited ]

I want to enable the wifi internet programatically in blackberry. How could i achieve this. Please help me for this.

Developer
Posts: 19,633
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to enable wifi internet programatically

Welcome to the forum.  I believe this question has been asked before.  Use the Search box (near top right) and see if you can find the answer for yourself.  If not, come back. 

Developer
Posts: 242
Registered: ‎02-19-2013
My Device: 9500
My Carrier: _

Re: How to enable wifi internet programatically

If found this code for this.

int i = RadioInfo.getActiveWAFs();
            int iState = RadioInfo.getState();
               
            if (iState==0){
                Radio.activateWAFs(RadioInfo.WAF_3GPP); //for GSM
                Radio.activateWAFs(RadioInfo.WAF_CDMA); //for CDMA
                //switches the network on
            }
            if (iState==1){
                Radio.deactivateWAFs(i);     
                //switches the network off
            }

Is it for enable the wifi or mobile data internet.??
Developer
Posts: 19,633
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to enable wifi internet programatically