Code example for UsbInterface

Methods: getEndpoint, getEndpointCount

0
            UsbDevice device = devices.get(deviceName); 
            mInterfaceCountView.setText( 
                    Integer.toString(device.getInterfaceCount())); 
            UsbInterface iface = device.getInterface(0); 
            mEndpointCountView.setText( 
                    Integer.toString(iface.getEndpointCount())); 
            mEndpoint = iface.getEndpoint(1); 
            mConnection = mUsbManager.openDevice(device); 
            mConnection.claimInterface(iface, true); 
 
            new Thread(new Runnable() { 
                public void run() { 
                    transferData(); 
                } 
            }).start(); 
        } 
    }; 
}