Skip navigation links

Package amlib.hw

This package provides APIs to communication with hardware.

See: Description

Package amlib.hw Description

This package provides APIs to communication with hardware.


Create HardwareInterface object, the applicationContext is needed for create a FileIOStream.
Before initialing the Reader, you should enumerating the hardware and assigning it to HardwareInterface object.
Enumerating the hardware is not implement in this package, please see USB Host
 UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE);
 UsbDevice device;
 HardwareInterface myDev; 
 boolean result;
 
...to abtain the correct UsbDevice.

 
 mMyDev = new HardwareInterface(HWType.eUSB, this.getApplicationContext());
 try{
      result = myDev.Init(mManager, mUsbDev);
 }
 catch(Exception e){
      e.printStackTrace();
 }
 
Skip navigation links