Android
android.net.wifi
public class

android.net.wifi.WifiInfo

java.lang.Object
android.net.wifi.WifiInfo Parcelable

Describes the state of any Wifi connection that is active or is in the process of being set up.

Summary

Constants

      Value  
Creator<WifiInfo CREATOR  Implement the Parcelable interface      
String  LINK_SPEED_UNITS  Link speed in Mbps   "Mbps" 
Constants inherited from interface android.os.Parcelable

Public Methods

          int  describeContents()
Implement the Parcelable interface
          String  getBSSID()
Return the basic service set identifier (BSSID) of the current access point.
      static    NetworkInfo.DetailedState  getDetailedStateOf(SupplicantState suppState)
Map a supplicant state into a fine-grained network connectivity state.
          int  getIpAddress()
          int  getLinkSpeed()
Returns the current link speed in LINK_SPEED_UNITS.
          String  getMacAddress()
          int  getNetworkId()
Each configured network has a unique small integer ID, used to identify the network when performing operations on the supplicant.
          int  getRssi()
Returns the received signal strength indicator of the current 802.11 network.
          String  getSSID()
Returns the service set identifier (SSID) of the current 802.11 network.
          SupplicantState  getSupplicantState()
Return the detailed state of the supplicant's negotiation with an access point, in the form of a SupplicantState object.
          String  toString()
Returns a string containing a concise, human-readable description of the receiver.
          void  writeToParcel(Parcel dest, int flags)
Implement the Parcelable interface
Methods inherited from class java.lang.Object
Methods inherited from interface android.os.Parcelable

Details

Constants

public static final Creator<WifiInfo> CREATOR

Implement the Parcelable interface

public static final String LINK_SPEED_UNITS

Link speed in Mbps
Constant Value: "Mbps"

Public Methods

public int describeContents()

Implement the Parcelable interface

public String getBSSID()

Return the basic service set identifier (BSSID) of the current access point. The BSSID may be null if there is no network currently connected.

Returns

  • the BSSID, in the form of a six-byte MAC address: XX:XX:XX:XX:XX:XX

public static NetworkInfo.DetailedState getDetailedStateOf(SupplicantState suppState)

Map a supplicant state into a fine-grained network connectivity state.

Parameters

suppState the supplicant state

Returns

public int getIpAddress()

public int getLinkSpeed()

Returns the current link speed in LINK_SPEED_UNITS.

Returns

  • the link speed.

See Also

public String getMacAddress()

public int getNetworkId()

Each configured network has a unique small integer ID, used to identify the network when performing operations on the supplicant. This method returns the ID for the currently connected network.

Returns

  • the network ID, or -1 if there is no currently connected network

public int getRssi()

Returns the received signal strength indicator of the current 802.11 network.

This is not normalized, but should be!

Returns

  • the RSSI, in the range ??? to ???

public String getSSID()

Returns the service set identifier (SSID) of the current 802.11 network. If the SSID is an ASCII string, it will be returned surrounded by double quotation marks.Otherwise, it is returned as a string of hex digits. The SSID may be null if there is no network currently connected.

Returns

  • the SSID

public SupplicantState getSupplicantState()

Return the detailed state of the supplicant's negotiation with an access point, in the form of a SupplicantState object.

Returns

public String toString()

Returns a string containing a concise, human-readable description of the receiver.

Returns

  • String a printable representation for the receiver.

public void writeToParcel(Parcel dest, int flags)

Implement the Parcelable interface
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:56