Share via


NdefMessage.ToByteArray Method

Definition

Return this NDEF Message as raw bytes.

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

Returns

Byte[]

NDEF Message in binary format

Attributes

Remarks

Return this NDEF Message as raw bytes.

The NDEF Message is formatted as per the NDEF 1.0 specification, and the byte array is suitable for network transmission or storage in an NFC Forum NDEF compatible tag.

This method will not chunk any records, and will always use the short record (SR) format and omit the identifier field when possible.

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

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