public class SimulScanManager extends EMDKBase
public class MainActivity extends Activity implements EMDKListener, SimulScanDataEventListerner, SimulScanStatusEventListerner { 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(callbackObj); reader.addStatusListener(callbackObj); 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