javax.microedition.contactless
Interface TargetListener


public interface TargetListener

The TargetListener provides a mechanism for the application to be notified, when contactless targets are discovered by the device hardware. This interface captures the event related to this target discovery. Applications must implement this interface to receive the notifications.

If an application has set a TargetListener through DiscoveryManager.addTargetListener(listener, targetType) method, it will receive this notification when the specified target is detected. The TargetListener provides information about the whole target, where NDEFRecordListener provides notification about the data on the target and it applies only to the NDEF_TAG target.

The application is responsible for any possible synchronization required in the listener methods. The listener methods must return quickly and should not perform any extensive processing. The method calls are intended as triggers for the application. The application should do all necessary extensive processing in a separate thread and only use these methods to initiate the processing.


Method Summary
 void targetDetected(TargetProperties[] properties)
          Called by the platform, when the contactless target that has a registered TargetListener is discovered by the device.
 

Method Detail

targetDetected

void targetDetected(TargetProperties[] properties)
Called by the platform, when the contactless target that has a registered TargetListener is discovered by the device. The type of the target is identified in the TargetProperties parameter. This notification always contains properties of at least one target. If there are multiple targets in the interrogation field, properties of all targets are returned.

Parameters:
properties - properties of the detected targets


Copyright © 2005-2006 Nokia Corporation. All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.