次の方法で共有


Ndef.WriteNdefMessage(NdefMessage) Method

Definition

Overwrite the NdefMessage on this tag.

[Android.Runtime.Register("writeNdefMessage", "(Landroid/nfc/NdefMessage;)V", "")]
public void WriteNdefMessage (Android.Nfc.NdefMessage? msg);
[<Android.Runtime.Register("writeNdefMessage", "(Landroid/nfc/NdefMessage;)V", "")>]
member this.WriteNdefMessage : Android.Nfc.NdefMessage -> unit

Parameters

msg
NdefMessage

the NDEF Message to write, must not 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 to write is malformed

Remarks

Overwrite the NdefMessage on this tag.

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.writeNdefMessage(android.nfc.NdefMessage).

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