public class MSRUtils
extends java.lang.Object
Integrate the calling method of MSR Reader.
Constructor and Description |
---|
MSRUtils() |
Modifier and Type | Method and Description |
---|---|
MSROperationResult |
waitForSwipe(int timeout,
Context context)
Firstly, call
open() , then call waitForSwipe(int)
wait for swipe. |
public MSROperationResult waitForSwipe(int timeout, Context context) throws DeviceException
open()
, then call waitForSwipe(int)
wait for swipe.
only after time out or operation finish success, the call will return.
the method can be cancelled by cancelRequest()
.
If timeout, return null and close the MSR reader. If return MSROperationResult, the third app must close the MSR Reader.
timeout
- the maximum pending time of the method, in milliseconds.
Note that the timeout will begin when the request begins to be
processed. The timeout
parameter is then only
indicative. There are two special cases for
timeout
, as follows:
timeout == FOREVER
, the method will wait
until something is available on the associated service's
input. timeout == IMMEDIATE
, the method
will immediately read the input
DeviceException.
DeviceException