public class SimulScanManager extends EMDKBase
public class MainActivity extends Activity implements EMDKListener, DataListerner, StatusListerner { protected void onCreate(Bundle savedInstanceState) { //.. EMDKResults results = EMDKManager.getEMDKManager(getApplicationContext(), this); } public void onOpened(EMDKManager emdkManager) { this.emdkManager = emdkManager; } //... simulScanManager = (SimulScanManager)this.emdkManager.getInstance(FEATURE_TYPE.SIMULSCAN); //... List<SimulScanReaderInfo> readerInfoList = simulScanManager.getSupportedDevicesInfo(); SimulScanReader reader = simulScanManager.getDevice(readerInfoList.get(0)); reader.addDataListener(this); reader.addStatusListener(this); reader.enable(); // set template before calling read reader.read(); //... reader.cancelRead(); //... reader.disable(); //.. EMDKManager.release(FEATURE_TYPE.SIMULSCAN); }
Modifier and Type | Class and Description |
---|---|
static class |
SimulScanManager.DeviceIdentifier
Defines scanner device identifier.
|
Modifier | Constructor and Description |
---|---|
protected |
SimulScanManager(Context context,
EMDKServiceConnection emdkServiceConnection) |
Modifier and Type | Method and Description |
---|---|
SimulScanReader |
getDevice(SimulScanManager.DeviceIdentifier deviceIdentifier)
This method returns the reader object based on device identifier specified.
|
SimulScanReader |
getDevice(SimulScanReaderInfo simulscanReaderInfo)
This method returns the reader object based on the input SimulScanReaderInfo object.
|
List<SimulScanReaderInfo> |
getSupportedDevicesInfo()
Returns list of supported reader devices information.
|
protected SimulScanManager(Context context, EMDKServiceConnection emdkServiceConnection) throws SimulScanException
SimulScanException
public List<SimulScanReaderInfo> getSupportedDevicesInfo()
public SimulScanReader getDevice(SimulScanReaderInfo simulscanReaderInfo) throws SimulScanException
This method returns the reader object based on the input SimulScanReaderInfo object.
simulscanReaderInfo
- The SimulScanReadInfo specifies which reader the application wants.SimulScanReader
if the input is valid. Otherwise null is returned.SimulScanException
- Exception will be throw if any error occurspublic SimulScanReader getDevice(SimulScanManager.DeviceIdentifier deviceIdentifier) throws SimulScanException
This method returns the reader object based on device identifier specified.
deviceIdentifier
- The device identifier specifies which reader the application wants.SimulScanReader
if the device identifier specified is valid on the device. Otherwise null is returned.SimulScanException
- Exception will be throw if any error occurs