Usb Host Check.apk (root needed) for checking and turning up the usb host。USBRFIDReader.apk. Insert IC Reader into device, and then a dialog will come out. You can click "OK" to launch the app.
com.syc.usbrfidreader to the src of project.Import package
import com.syc.usbrfidreader;
Modify the file AndroidManifest.xml(Android Usb Host)
<manifest ...>
<uses-feature android:name="android.hardware.usb.host" />
<uses-sdk android:minSdkVersion="12" />
...
<application>
<activity ...>
...
<intent-filter>
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
</intent-filter>
<meta-data android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
android:resource="@xml/device_filter" />
</activity>
</application>
Create file res/xml/device_filter.xml, VID: 0xffff(65535), PID: 0x35(53)
<?xml version="1.0" encoding="utf-8"?>
<resources>
<usb-device vendor-id="65535" product-id="53"/>
</resources>
In main activity
UsbDevice device = (UsbDevice) intent.getParcelableExtra(UsbManager.EXTRA_DEVICE);
UsbManager manager = (UsbManager) this.getSystemService(this.USB_SERVICE);
Initialize ICReaderApi
ICReaderApi api = new ICReaderApi(device, manager);
Use the function of ICReaderApi, for example
api.API_SetSerNum(newValue, buffer);