Tag.GetId Method

Definition

Get the Tag Identifier (if it has one).

[Android.Runtime.Register("getId", "()[B", "")]
public byte[]? GetId ();
[<Android.Runtime.Register("getId", "()[B", "")>]
member this.GetId : unit -> byte[]

Returns

Byte[]

ID as byte array, never null

Attributes

Remarks

Get the Tag Identifier (if it has one).

The tag identifier is a low level serial number, used for anti-collision and identification.

Most tags have a stable unique identifier (UID), but some tags will generate a random ID every time they are discovered (RID), and there are some tags with no ID at all (the byte array will be zero-sized).

The size and format of an ID is specific to the RF technology used by the tag.

This function retrieves the ID as determined at discovery time, and does not perform any further RF communication or block.

Java documentation for android.nfc.Tag.getId().

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