I have followed the following link to connect with local wifi. It is working perfect. I am able to connect to my local wifi.
But, I really want the current status of the wifi, I am using following code to get the status of wifi. But unfortunately I am only able to get 'DISABLED', 'ENABLED' and 'SCANNING' status, I really want to receive other intermediary states.
Can you tell me what I am doing wrong.
public class ConnectionChangeReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        NetworkInfo info = intent.getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO);
        Message msg = new Message();
        msg.what = 5;
        Bundle b = new Bundle();
        String sStatus = "UnKnown";
        switch(info.getDetailedState()){
        case AUTHENTICATING:
            sStatus = "Authenticating...";
            break;
        case    CONNECTED:
            sStatus = "Connected";
            break;
        case    CONNECTING:
            sStatus = "Connecting...";
            break;
        case    DISCONNECTED:
            sStatus = "Disconnected";
            break;
        case    DISCONNECTING:
            sStatus = "Disconnecting...";
            break;
        case    FAILED:
            sStatus = "Failed";
            break;
        case    IDLE:
            sStatus = "Idle";
            break;
        case    OBTAINING_IPADDR :
            sStatus = "Obtaining IP Address...";
            break;
        case    SCANNING:
            sStatus = "Scanning...";
            break;
        case    SUSPENDED:
            sStatus = "Suspended";
            break;
        }
        b.putString("status", sStatus);
        msg.setData(b);
        mHandler.sendMessage(msg);
    }
}
I register the broadcast receiver in the following way
IntentFilter filter = new IntentFilter(
        ConnectivityManager.CONNECTIVITY_ACTION);
    registerReceiver(networkStateReceiver, filter);
 
     
     
     
    