BlackBerry: incorporate Wi-Fi into code

Is there a way to enable Wifi from code in BlackBerry OS?

thanks

- EDIT -

I just wanted to add a code snippet to check if WiFi is turned on:

if ( (RadioInfo.getActiveWAFs() & RadioInfo.WAF_WLAN) == RadioInfo.WAF_WLAN ) { // do stuff } 
+6
source share
2 answers

You can use the Radio.activateWAFs() method if you pass WAF_WLAN as a parameter. You can use it to enable or disable each wireless connection on the device.

+7
source

Radio.deactivateWAFs(RadioInfo.WAF_WLAN);

Radio.activateWAFs(RadioInfo.WAF_WLAN);

+6
source

Source: https://habr.com/ru/post/901450/


All Articles