다음을 통해 공유


Ndef.MakeReadOnly Method

Definition

Make a tag read-only.

[Android.Runtime.Register("makeReadOnly", "()Z", "")]
public bool MakeReadOnly ();
[<Android.Runtime.Register("makeReadOnly", "()Z", "")>]
member this.MakeReadOnly : unit -> bool

Returns

true on success, false if it is not possible to make this tag read-only

Attributes

Exceptions

if the tag leaves the field

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

Remarks

Make a tag read-only.

This sets the CC field to indicate the tag is read-only, and where possible permanently sets the lock bits to prevent any further modification of the memory.

This is a one-way process and cannot be reverted!

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.makeReadOnly().

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