Udostępnij za pośrednictwem


ITagTechnology Interface

Definition

TagTechnology is an interface to a technology in a Tag.

[Android.Runtime.Register("android/nfc/tech/TagTechnology", "", "Android.Nfc.Tech.ITagTechnologyInvoker")]
public interface ITagTechnology : IDisposable, Java.Interop.IJavaPeerable, Java.IO.ICloseable
[<Android.Runtime.Register("android/nfc/tech/TagTechnology", "", "Android.Nfc.Tech.ITagTechnologyInvoker")>]
type ITagTechnology = interface
    interface ICloseable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Derived
Attributes
Implements

Remarks

TagTechnology is an interface to a technology in a Tag.

Obtain a TagTechnology implementation by calling the static method get() on the implementation class.

NFC tags are based on a number of independently developed technologies and offer a wide range of capabilities. The TagTechnology implementations provide access to these different technologies and capabilities. Some sub-classes map to technology specification (for example NfcA, IsoDep, others map to pseudo-technologies or capabilities (for example Ndef, NdefFormatable).

It is mandatory for all Android NFC devices to provide the following TagTechnology implementations. <ul> <li>NfcA (also known as ISO 14443-3A) <li>NfcB (also known as ISO 14443-3B) <li>NfcF (also known as JIS 6319-4) <li>NfcV (also known as ISO 15693) <li>IsoDep<li>Ndef on NFC Forum Type 1, Type 2, Type 3 or Type 4 compliant tags </ul> It is optional for Android NFC devices to provide the following TagTechnology implementations. If it is not provided, the Android device will never enumerate that class via Tag#getTechList. <ul> <li>MifareClassic<li>MifareUltralight<li>NfcBarcode<li>NdefFormatable must only be enumerated on tags for which this Android device is capable of formatting. Proprietary knowledge is often required to format a tag to make it NDEF compatible. </ul>

TagTechnology implementations provide methods that fall into two classes: <em>cached getters</em> and <em>I/O operations</em>. <h4>Cached getters</h4> These methods (usually prefixed by get or is) return properties of the tag, as determined at discovery time. These methods will never block or cause RF activity, and do not require #connect to have been called. They also never update, for example if a property is changed by an I/O operation with a tag then the cached getter will still return the result from tag discovery time. <h4>I/O operations</h4> I/O operations may require RF activity, and may block. They have the following semantics. <ul> <li>#connect must be called before using any other I/O operation. <li>#close must be called after completing I/O operations with a TagTechnology, and it will cancel all other blocked I/O operations on other threads (including #connect with IOException. <li>Only one TagTechnology can be connected at a time. Other calls to #connect will return IOException. <li>I/O operations may block, and should never be called on the main application thread. </ul>

<p class="note"><strong>Note:</strong> Methods that perform I/O operations require the android.Manifest.permission#NFC permission.

Java documentation for android.nfc.tech.TagTechnology.

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.

Properties

Handle

Gets the JNI value of the underlying Android object.

(Inherited from IJavaObject)
IsConnected

Helper to indicate if I/O operations should be possible.

JniIdentityHashCode

Returns the value of java.lang.System.identityHashCode() for the wrapped instance.

(Inherited from IJavaPeerable)
JniManagedPeerState

State of the managed peer.

(Inherited from IJavaPeerable)
JniPeerMembers

Member access and invocation support.

(Inherited from IJavaPeerable)
PeerReference

Returns a JniObjectReference of the wrapped Java object instance.

(Inherited from IJavaPeerable)
Tag

Get the Tag object backing this ITagTechnology object.

Methods

Close()

Disable I/O operations to the tag from this TagTechnology object, and release resources.

Connect()

Enable I/O operations to the tag from this TagTechnology object.

Disposed()

Called when the instance has been disposed.

(Inherited from IJavaPeerable)
DisposeUnlessReferenced()

If there are no outstanding references to this instance, then calls Dispose(); otherwise, does nothing.

(Inherited from IJavaPeerable)
Finalized()

Called when the instance has been finalized.

(Inherited from IJavaPeerable)
SetJniIdentityHashCode(Int32)

Set the value returned by JniIdentityHashCode.

(Inherited from IJavaPeerable)
SetJniManagedPeerState(JniManagedPeerStates) (Inherited from IJavaPeerable)
SetPeerReference(JniObjectReference)

Set the value returned by PeerReference.

(Inherited from IJavaPeerable)
UnregisterFromRuntime()

Unregister this instance so that the runtime will not return it from future Java.Interop.JniRuntime+JniValueManager.PeekValue invocations.

(Inherited from IJavaPeerable)

Extension Methods

ConnectAsync(ITagTechnology)
JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to