본문 바로가기

프로그래밍/안드로이드

안드로이드 MAC ADDRESS 가지고 오기


WifiManager wifiManager = (WifiManager) getSystemService(WIFI_SERVICE); 
WifiInfo wifiInfo = wifiManager.getConnectionInfo(); 
 
 Preference wifiMacAddressPref = findPreference(KEY_MAC_ADDRESS); 
String macAddress = wifiInfo == null ? null : wifiInfo.getMacAddress();

[출처] Android Side - http://www.androidside.com/bbs/board.php?bo_table=B49&wr_id=1116#c_1124





public class

WifiInfo

extends Object
implements Parcelable

Public Methods
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.
boolean getHiddenSSID()
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 this object.