
Buffer received was : result.toString() Result.append(String.format(" %02X ", bb)) UsbDeviceConnection connection = mUsbManager.openDevice(device) MUsbManager.requestPermission(device, mPermissionIntent) Īnd now you will need endpoints, simply send an APDU (smartcard command) over the bulk-out endpoint and expect to receive a response APDU over the bulk-in endpoint.Ĭode to get endpoints :: UsbEndpoint epOut = null, epIn = null UsbDevice device = deviceList.get("//the device you want to work with") HashMap deviceList = mUsbManager.getDeviceList() PendingIntent mPermissionIntent = PendingIntent.getBroadcast(this, 0, new Intent(ACTION_USB_PERMISSION), 0) UsbManager mUsbManager = (UsbManager) getSystemService(Context.USB_SERVICE) įinal String ACTION_USB_PERMISSION = "_PERMISSION" : //Allows you to enumerate and communicate with connected USB devices.



In java the communication takes place using package javax.smarcard which is not available for Android so take a look here for getting an idea as to how you can communicate or send/receive APDU (smartcard command).
