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
Posts: 115
Registered: ‎10-04-2008
My Device: Not Specified

How to Turn Off Wireless Connectivity on Blackberry device programmatically?

Hi,

 

I want to know whether is it possible to Turn Off Wireless Connections on Blackberry devices programmatically? I have read RadioInfo Class but it gives information regarding networks, but do not provide any method to turn off the wirless connection.

 

If this is not possible then, Can this be done via Blackberry Enterprise Server. Can a administrator impose such policy that Devices All Wireless Connection are turned off?

 

Hope to get a quick reply.

 

Thanks & Regards

Sunil 

Regards
Sunil
Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: How to Turn Off Wireless Connectivity on Blackberry device programmatically?

Have a look at Radio.deactivateWAFs().

 

Also, since there is an application permission for WiFi access that is set globally and on per-application basis (Options -> Advanced Options -> Applications -> Edit Permissions), I expect there is a way to allow/deny this permission in the IT Poliy on a BES. However, I can't confirm whether it's really possible.

Developer
Posts: 115
Registered: ‎10-04-2008
My Device: Not Specified

Re: How to Turn Off Wireless Connectivity on Blackberry device programmatically?

Hi,

 

Radio.deactivateWAFS() will it deactivate all the wireless connection or just internet connectivity or Bluetooth connectivity. I want to disconnect all the wireless connectivity.

 

Thanks & Regards

Sunil 

Regards
Sunil
Highlighted
BlackBerry Development Advisor
Posts: 15,300
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: How to Turn Off Wireless Connectivity on Blackberry device programmatically?

The deactivateWAFs method accepts a bitfield of RadioInfo.WAF_* flags indicating the Wireless Access Families whose radios should be turned off.  This means you can turn off multiple radios with a single call to this method.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker