共用方式為


Ndef.NdefMessage Property

Definition

Read the current android.nfc.NdefMessage on this tag.

public Android.Nfc.NdefMessage? NdefMessage { [Android.Runtime.Register("getNdefMessage", "()Landroid/nfc/NdefMessage;", "")] get; }
[<get: Android.Runtime.Register("getNdefMessage", "()Landroid/nfc/NdefMessage;", "")>]
member this.NdefMessage : Android.Nfc.NdefMessage

Property Value

the NDEF Message, can be null

Attributes

Exceptions

if the tag leaves the field

if there is an I/O failure, or the operation is canceled

if the NDEF Message on the tag is malformed

Remarks

Read the current android.nfc.NdefMessage on this tag.

This always reads the current NDEF Message stored on the tag.

Note that this method may return null if the tag was in the INITIALIZED state as defined by NFC Forum, as in that state the tag is formatted to support NDEF but does not contain a message yet.

This is an I/O operation and will block until complete. It must not be called from the main application thread. A blocked call will be canceled with IOException if #close is called from another thread.

<p class="note">Requires the android.Manifest.permission#NFC permission.

Java documentation for android.nfc.tech.Ndef.getNdefMessage().

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