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
ajaysainsgvu
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.

Please use plain text.
Developer
peter_strange
Posts: 19,601
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. 

Please use plain text.
Developer
ajaysainsgvu
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.??
Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to enable wifi internet programatically

Please use plain text.