다음을 통해 공유


WifiInfo.MacAddress Property

Definition

Returns the MAC address used for this connection.

public virtual string? MacAddress { [Android.Runtime.Register("getMacAddress", "()Ljava/lang/String;", "GetGetMacAddressHandler")] get; }
[<get: Android.Runtime.Register("getMacAddress", "()Ljava/lang/String;", "GetGetMacAddressHandler")>]
member this.MacAddress : string

Property Value

MAC address of the connection or "02:00:00:00:00:00" if the caller has insufficient permission.

        Requires <code data-dev-comment-type="c">android.Manifest.permission#LOCAL_MAC_ADDRESS</code> and
        <code data-dev-comment-type="c">android.Manifest.permission#ACCESS_FINE_LOCATION</code>.
Attributes

Remarks

Returns the MAC address used for this connection. In case of Multi Link Operation (MLO), returned value is the Station MLD MAC address.

Java documentation for android.net.wifi.WifiInfo.getMacAddress().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to