How does application gets to know for which access point wifi broadcast is received
<p>When we register for a wifi related broad cast receiver like 'SUPPLICANT_STATE_CHANGED_ACTION' in <code>onReceiver</code> call back function, how we get to know that for which wifi access points we have received this event. I don't find any Extra in the received intent whihc can give me this information.    </p>

<p>Does any body know the way by which we can get the information related to access point when we receive wifi related broadcast receiver.</p>

<p>I have also tried following:</p>

<pre><code>@Override
public void onReceive(Context context, Intent intent) 
{
    final String action = intent.getAction();
    if( action.equals(WifiManager.SUPPLICANT_STATE_CHANGED_ACTION) ) 
    {
        String ssid = "Not Found";
        WifiManager wifiManager = getSystemService(Context.WIFI_SERVICE);
        if( wifiManager != null )
        {
            WifiInfo info = wifiManager.getConnectionInfo(); 
            ssid = info.getSSID();
        }
        Log.d("", "SUPPLICANT_STATE_CHANGED_ACTION FOR SSID:"+ssid);
    }        
}
</code></pre>

<p>Above code works only in completed state and not in disconnected state.<br>
Is there any broadcast that can tell me wifi access point supplicant state.</p>

<p>Thanks.</p>
