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

Native Development

Posts: 132
Registered: ‎11-06-2012
My Device: BlackBerry Passport
Accepted Solution

Check the Wifi signal with "wifi_get_status"

This is the snipet code I use to check the wifi signal, it's right at fist time, but now it's away show ON even i turn off the wifi. Please help me with this problem. Thanks.

bool checkWifi(){
	wifi_status_t status = WIFI_STATUS_RADIO_ON;
	int i = wifi_get_status(&status);
	if (i == 0)
		return true; // Wifi On
	return false; // Wifi Off


Posts: 196
Registered: ‎03-04-2013
My Device: BB Z10
My Carrier: Rogers

Re: Check the Wifi signal with "wifi_get_status"

[ Edited ]

Hey there...


You are checking the wrong value...


bool checkWifi() {
    wifi_status_t status;

    if (WIFI_SUCCESS == wifi_get_status(&status)) {
        if (status == WIFI_STATUS_RADIO_ON) {
            return true;
    return false;