Partager via


IdentityChangedListener.OnIdentityChanged(Byte[]) Method

Definition

Identity change may be due to device joining a cluster, starting a cluster, or discovery interface change (addresses are randomized at regular intervals).

[Android.Runtime.Register("onIdentityChanged", "([B)V", "GetOnIdentityChanged_arrayBHandler", ApiSince=26)]
public virtual void OnIdentityChanged (byte[]? mac);
[<Android.Runtime.Register("onIdentityChanged", "([B)V", "GetOnIdentityChanged_arrayBHandler", ApiSince=26)>]
abstract member OnIdentityChanged : byte[] -> unit
override this.OnIdentityChanged : byte[] -> unit

Parameters

mac
Byte[]

The MAC address of the Aware discovery interface. The application must have the android.Manifest.permission#ACCESS_FINE_LOCATION to get the actual MAC address, otherwise all 0's will be provided.

Attributes

Remarks

Identity change may be due to device joining a cluster, starting a cluster, or discovery interface change (addresses are randomized at regular intervals). The implication is that peers you've been communicating with may no longer recognize you and you need to re-establish your identity - e.g. by starting a discovery session.

Java documentation for android.net.wifi.aware.IdentityChangedListener.onIdentityChanged(byte[]).

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