java.lang.Object | |
↳ | android.nfc.NdefMessage |
Represents an NDEF (NFC Data Exchange Format) data message that contains one or more NdefRecord
s.
An NDEF message includes "records" that can contain different sets of data, such as
MIME-type media, a URI, or one of the supported RTD types (see NdefRecord
). An NDEF
message always contains zero or more NDEF records.
This is an immutable data class.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CREATOR |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create an NDEF message from raw bytes.
| |||||||||||
Create an NDEF message from NDEF records.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Get the NDEF records inside this NDEF message.
| |||||||||||
Returns a byte array representation of this entire NDEF message.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
android.os.Parcelable
|
Create an NDEF message from raw bytes.
Validation is performed to make sure the Record format headers are valid, and the ID + TYPE + PAYLOAD fields are of the correct size.
FormatException |
---|
Get the NDEF records inside this NDEF message.
Returns a byte array representation of this entire NDEF message.