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: 354
Registered: ‎06-05-2013
My Device: Blackberry Z10
My Carrier: Vodafone
Accepted Solution

Can i programmatcally make device to airplane/flight mode in blackberry?

hi,

 

Is there any way to programmatcally make device to airplane/flight mode in blackberry. if yes, provide me some code or tutorial for that

 

Thanks & Regards

Developer
Posts: 16,997
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Can i programmatcally make device to airplane/flight mode in blackberry?

you can use http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/system/Radio.html#deactivateWA... to deactivate networks.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 354
Registered: ‎06-05-2013
My Device: Blackberry Z10
My Carrier: Vodafone

Re: Can i programmatcally make device to airplane/flight mode in blackberry?

Thanks for help done it using below code

int _activeWAFs = 0;
_activeWAFs = RadioInfo.getActiveWAFs();
System.out.println("_activeWAFs ---> " + _activeWAFs);
Radio.deactivateWAFs(_activeWAFs);