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
New Contributor
Posts: 8
Registered: ‎07-19-2010
My Device: Not Specified
My Carrier: begineer in mobile devolopment

Help about on And off WIFI from code.

Hi all,

 

I am currently doing a project And I need a code to turn on And the Wifi when user click on a button.

 

That is I asked If  "turn on the wifi?" And a button has given. If user click it turn on the wifi connection.


And I asked If "turn off the Wifi?" when user click button it turn off the Wifi connection.

 

Is it possible to implement?

 

Any help will be appreciate..

 

Thanks.

Highlighted
Contributor
Posts: 14
Registered: ‎01-10-2011
My Device: Not Specified

Re: Help about on And off WIFI from code.

hi,

 

I hope you might have got the solution. Anyway this is how you can do it:

 

 

 

Radio.deactivateWAFs(RadioInfo.WAF_WLAN);

Radio.activateWAFs(RadioInfo.WAF_WLAN);

 

Shujaat