Compartir a través de


NdefMessage.GetRecords Method

Definition

Get the NDEF Records inside this NDEF Message.

[Android.Runtime.Register("getRecords", "()[Landroid/nfc/NdefRecord;", "")]
public Android.Nfc.NdefRecord[]? GetRecords ();
[<Android.Runtime.Register("getRecords", "()[Landroid/nfc/NdefRecord;", "")>]
member this.GetRecords : unit -> Android.Nfc.NdefRecord[]

Returns

array of one or more NDEF records.

Attributes

Remarks

Get the NDEF Records inside this NDEF Message.

An NdefMessage always has one or more NDEF Records: so the following code to retrieve the first record is always safe (no need to check for null or array length >= 1):

NdefRecord firstRecord = ndefMessage.getRecords()[0];

Java documentation for android.nfc.NdefMessage.getRecords().

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