Accessing WiFi

Version 2


    The WiFi information can be accessed by registering your application as a wifi intent receiver as shown below:

     

    mIntent_Receiver = new Intent_Receiver();

    mIntentFilter = new IntentFilter();

    mIntentFilter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION);

    mIntentFilter.addAction(WifiManager.RSSI_CHANGED_ACTION);

    registerReceiver(mIntent_Receiver,mIntentFilter);

     

    See http://developer.android.com/reference/android/net/wifi/WifiManager.html for the values included as extras in the received intent.

     

    The attached sample demonstrates the use of Android WiFi APIs for enabling, disabling and determining the status of WiFi.