When using SimulScanReader consider the following:Example Usage: List<SimulScanReaderInfo> readerInfoList = simulscanManager.getSupportedDevicesInfo(); SimulScanReader reader = simulscanManager.getDevice(readerInfoList.get(0)); reader.addDataListener(callbackObj); reader.addStatusListener(callbackObj); reader.enable(); // Set template before calling read reader.read(); reader.cancelRead(); reader.disable();
@Deprecated
public class SimulScanReader
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
SimulScanReader.DataListerner
Deprecated.
This feature is supported only on devices prior to those running Android 10 Q.
An interface for notifying client applications when the scan data is available.
|
static interface |
SimulScanReader.StatusListerner
Deprecated.
This feature is supported only on devices prior to those running Android 10 Q.
An interface for notifying client applications to notify scan events.
|
Modifier and Type | Method and Description |
---|---|
void |
addDataListener(SimulScanReader.DataListerner dataListener)
Deprecated.
The client can register to get data notification via callbacks.
|
void |
addStatusListener(SimulScanReader.StatusListerner statusListener)
Deprecated.
The client can register to get status notification via callbacks.
|
void |
cancelRead()
Deprecated.
This cancels any pending read() calls
|
void |
disable()
Deprecated.
Disables the reader hardware.
|
void |
enable()
Deprecated.
Enables the reader hardware.
|
void |
fetchTemplate(java.lang.String userName,
java.lang.String password)
Deprecated.
Fetch templates from an external server and place them in the template directory.
|
SimulScanConfig |
getConfig()
Deprecated.
Gets the current configuration settings for this reader device.
|
SimulScanReaderInfo |
getReaderInfo()
Deprecated.
Returns information about the reader device.
|
boolean |
isEnabled()
Deprecated.
Returns reader enabled state
|
java.lang.Boolean |
isReadPending()
Deprecated.
Another read() cannot be submitted while a read is pending.
|
void |
read()
Deprecated.
This method initiates a SimulScan read() request.
|
void |
removeDataListener(SimulScanReader.DataListerner dataListener)
Deprecated.
The client can unregister to not get data notification via callbacks.
|
void |
removeStatusListener(SimulScanReader.StatusListerner statusListener)
Deprecated.
The client can unregister to not get status notification via callbacks.
|
void |
setConfig(SimulScanConfig config)
Deprecated.
Changes the settings for this reader device.
|
public SimulScanReaderInfo getReaderInfo()
public java.lang.Boolean isReadPending()
public void enable() throws SimulScanException
Example Usage: reader.enable();
SimulScanException
- The exception will thrown if the reader enable fails.public void disable() throws SimulScanException
Example Usage: reader.disable();
SimulScanException
- The exception will thrown if the reader disable fails.public boolean isEnabled()
public SimulScanConfig getConfig() throws SimulScanException
Example Usage: reader.enable(); SimulScanConfig config = reader.getConfig();
SimulScanException
- Exception will be throw if any error occurspublic void setConfig(SimulScanConfig config) throws SimulScanException
Example Usage: SimulScanMultiTemplate template1 = new SimulScanMultiTemplate(fileUri);//fileUri points to the template SimulScanReader reader = simulscanManager.getDevice(template1.deviceIdentifier); reader.enable(); SimulScanConfig config = reader.getConfig(); config.multiTemplate = template1; reader.setConfig(config);
config
- The Parameters to use for this reader device.SimulScanException
- Exception will be throw if any error occurs while setting the parameters.public void read() throws SimulScanException
Example Usage: reader.read();
SimulScanException
- Exception will be throw if any error occurs during the read requestpublic void cancelRead() throws SimulScanException
Example Usage: reader.cancelRead();
SimulScanException
- The exception will thrown if error occurs during the cancelRead request.public void addDataListener(SimulScanReader.DataListerner dataListener)
dataListener
- The DataListerner callabck object.SimulScanException
- Exception will be throw if any error occurspublic void removeDataListener(SimulScanReader.DataListerner dataListener)
dataListener
- The DataListerner callback object to be unregisteredpublic void addStatusListener(SimulScanReader.StatusListerner statusListener)
statusListener
- The StatusListerner callback objectSimulScanException
- Exception will be throw if any error occurspublic void removeStatusListener(SimulScanReader.StatusListerner statusListener)
statusListener
- The StatusListerner callback object to be unregisteredpublic void fetchTemplate(java.lang.String userName, java.lang.String password) throws SimulScanException
userName
- Username for SimulScan Template Builderpassword
- Password for SimulScan Template BuilderSimulScanException
- The exception will be thrown if a read is in progress