Is there a way to enable Wifi from code in BlackBerry OS?
Thx
-- EDIT --
I just wanted to add the code snippet for checking if WiFi is already enabled:
if ( (RadioInfo.getActiveWAFs() & RadioInfo.WAF_WLAN) == RadioInfo.WAF_WLAN ) {
// do stuff
}
Wi-Fi: From the Home screen, tap the “Settings” (Gear) icon that appears in the top right corner and tap “Wi-Fi”. Toggle Wi-Fi “On” or “Off”.
Verify that you're in a Wi-Fi coverage area. If you're connecting to a home network, check and see if other wireless devices are able to connect. If other devices can't connect, you might need to reset your router (if you do not run the Wi-Fi network, contact the owner before resetting the wireless router).
You can connect to a WiFi network by scanning the QR Code from any smartphone or tablet. With the help of a QR Code generator for WiFi, you can create a QR Code that connects to the network automatically when scanned.
You can use the Radio.activateWAFs()
method to do this, if you pass WAF_WLAN
as a parameter. You can use it to enable or disable each wireless connection on the device.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With