11.07.2015 Views

Contactless Communication API - Oracle Software Delivery Cloud

Contactless Communication API - Oracle Software Delivery Cloud

Contactless Communication API - Oracle Software Delivery Cloud

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

DiscoveryManagerDiscoveryManager — class in package javax.microedition.contactlesspublic class DiscoveryManager extends java.lang.ObjectMethod summaryvoidvoidvoidstatic DiscoveryManagerjava.lang.Stringstatic TargetType[]voidvoidvoidvoidaddNDEFRecordListener(javax.microedition.contactless.ndef.NDEFRecordListener listener,javax.microedition.contactless.ndef.NDEFRecordType recordType)addTargetListener(TargetListener listener,TargetTypetargetType)addTransactionListener(TransactionListener listener)getInstance()getProperty(java.lang.String name)getSupportedTargetTypes()removeNDEFRecordListener(javax.microedition.contactless.ndef.NDEFRecordListener listener,javax.microedition.contactless.ndef.NDEFRecordType recordType)removeTargetListener(TargetListener listener,TargetTypetargetType)removeTransactionListener(TransactionListener listener)setProperty(java.lang.String name,java.lang.String value)InheritanceDescriptionjava.lang.Object → DiscoveryManagerMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitThe DiscoveryManager class offers the mechanism to discover targets for contactless communication. It is the startingpoint for the application using the <strong>Contactless</strong> <strong>Communication</strong> <strong>API</strong> . This class also manages the different listeners in this<strong>API</strong>.This class also provides a method to query contactless targets supported by the <strong>API</strong> implementation. MethodgetSupportedTargetTypes returns the list of supported contactless targets. All the targets that can be accessed throughthis <strong>API</strong> are specified in the TargetType class.TargetListener is used to request a notification for a specific contactless TargetType the application is interested in.NDEFRecordListener provides a notification about specific NDEF record type that is in the read from the NFC Forum complianttag.Inside a Java virtual machine, there must be at most one TargetListener for each TargetType . The restriction forone TargetListener is needed, because the RFID hardware is able to handle only one connection to the physical targetat a time. The registration of TargetListener should fail, if there is an existing listener in other virtual machines or inthe native platform. The addTargetListener method throws an exception, if there is an existing listener defined. Theexisting listener may be a native application.11

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!