Best code examples for Android UsbDeviceConnection class (android.hardware.usb.UsbDeviceConnection)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android UsbDeviceConnection class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Android UsbDeviceConnection examples from Open Source projects
This code example shows how to use the following methods: controlTransfer
46:	connection.controlTransfer(0x40, 0, 0, 0, null, 0, 0);// reset 
47:	connection.controlTransfer(0x40, 0, 1, 0, null, 0, 0);// clear Rx 
48:	connection.controlTransfer(0x40, 0, 2, 0, null, 0, 0);// clear Tx 
49:	connection.controlTransfer(0x40, 0x02, 0x0000, 0, null, 0, 0); // flow control none 
-
55:	connection.controlTransfer(0x40, 0x03, 0x0034, 0, null, 0, 0); 
-
57:	connection.controlTransfer(0x40, 0x04, 0x0008, 0, null, 0, 0); // n/8/1 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: claimInterface
136:	if (connection != null && connection.claimInterface(intf, true)) { 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: controlTransfer
44:	connection.controlTransfer(0x40, 0x00, 0xff, 0xff, null, 0, 0); 
45:	connection.controlTransfer(0x40, 0x01, 0x00, 0x02, null, 0, 0); 
46:	connection.controlTransfer(0x40, 0x01, 0x0f, 0x00, null, 0, 0); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: controlTransfer
52:	connection.controlTransfer(USB_CONTROL_IN,  0x5f, 0x0000, 0x0000, buffer, 8, 0); //0x27 0x00 
53:	connection.controlTransfer(USB_CONTROL_OUT, 0xa1, 0x0000, 0x0000, null, 0, 0); 
-
56:	connection.controlTransfer(USB_CONTROL_OUT, 0x9a, 0x1312, 0x9803, null, 0, 0); 
57:	connection.controlTransfer(USB_CONTROL_OUT, 0x9a, 0x0f2c, 0x0010, null, 0, 0); 
-
59:	connection.controlTransfer(USB_CONTROL_IN,  0x95, 0x2518, 0x0000, buffer, 8, 0); //0x56 0x00 
60:	connection.controlTransfer(USB_CONTROL_OUT, 0x95, 0x2518, 0x0050, null, 0, 0); 
-
63:	connection.controlTransfer(USB_CONTROL_IN,  0x95, 0x0706, 0x0000, buffer, 8, 0); //0xff 0xee 
-
65:	connection.controlTransfer(USB_CONTROL_OUT, 0xa1, 0x501f, 0xd90a, null, 0, 0); 
-
68:	connection.controlTransfer(USB_CONTROL_OUT, 0x9a, 0x1312, 0x9803, null, 0, 0); 
69:	connection.controlTransfer(USB_CONTROL_OUT, 0x9a, 0x0f2c, 0x0010, null, 0, 0); 
-
72:	connection.controlTransfer(USB_CONTROL_OUT, 0xa4, 0x00ff, 0x0000, null, 0, 0); // or maybe 0xffff? 
-
77:	connection.controlTransfer(USB_CONTROL_IN,  0x95, 0x0706, 0x0000, buffer, 8, 0); //0x9f 0xee 
-
80:	connection.controlTransfer(USB_CONTROL_OUT, 0xa4, 0x00ff, 0x0000, null, 0, 0); // or maybe 0xffff? 
-
83:	connection.controlTransfer(USB_CONTROL_OUT, 0x9a, 0x1312, 0x9803, null, 0, 0); 
84:	connection.controlTransfer(USB_CONTROL_OUT, 0x9a, 0x0f2c, 0x0010, null, 0, 0); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: close, controlTransfer
114:	connection.controlTransfer(REQUEST_TYPE, REQUEST, REQ_VALUE, REQ_INDEX, 
-
120:	connection.close(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: controlTransfer
287:	connection.controlTransfer(0x21, 0x20, 0x0000, 0x0000, line_coding, line_coding.length, 20); 
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods: claimInterface
50:	if (!mConnection.claimInterface(mControlInterface, true)) { 
-
61:	if (!mConnection.claimInterface(mDataInterface, true)) { 
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods: close, releaseInterface
348:	connection.releaseInterface(intf); 
349:	connection.close(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: controlTransfer
163:	int nTransferred = mConnection.controlTransfer( 
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods: close, releaseInterface
173:	mUsbDeviceConnection.releaseInterface(mUsbInterface[0]); 
-
176:	mUsbDeviceConnection.close(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: controlTransfer
99:	connection.controlTransfer(GET_LINE_REQUEST_TYPE, GET_LINE_REQUEST, 0, 0, oldSettings, 7, 100); 
-
164:	connection.controlTransfer(SET_LINE_REQUEST_TYPE, SET_LINE_REQUEST, 0, 0, buffer, 7, 100); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: close, releaseInterface
173:	mUsbDeviceConnection.releaseInterface(mUsbInterface[0]); 
-
176:	mUsbDeviceConnection.close(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: close, releaseInterface
285:	connection.releaseInterface(intf); 
286:	connection.close(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: close
147:	connection.close(); // Linux take care of releasing everything else ... 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: claimInterface
110:	connection.claimInterface(intf, forceClaim); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: close, releaseInterface
277:	connection.releaseInterface(intf); 
278:	connection.close(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: requestWait
74:	connection.requestWait(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: bulkTransfer
97:	int length = mConnection.bulkTransfer(mEndpointIn, readbuffer, readbuffer.length, 100); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: releaseInterface
76:	deviceConnection.releaseInterface(usbInterface); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: bulkTransfer
33:	int i =  readDataConnection.bulkTransfer(usbEndpointRead, buf, bufferSize, 5); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: close, releaseInterface
254:	connection.releaseInterface(intf); 
255:	connection.close(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: close, releaseInterface
252:	connection.releaseInterface(intf); 
253:	connection.close(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: close, releaseInterface
168:	mUsbDeviceConnection.releaseInterface(mUsbInterface); 
169:	mUsbDeviceConnection.close(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: close
203:	con.close(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: bulkTransfer
67:	int result = mConnection.bulkTransfer(mBulkOutEndpoint, 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: bulkTransfer
67:	int result = mConnection.bulkTransfer(mBulkOutEndpoint, 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: claimInterface
193:	if (connection != null && connection.claimInterface(intf, true)) { 
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods: getFileDescriptor
131:	logger.debug("Adding file descriptor {} for {}", connection.getFileDescriptor(), device.getDeviceName()); 
132:	fileDescriptors.put(device.getDeviceName(), connection.getFileDescriptor()); 
Full Snippet Info
3
CodeRank
Related Android UsbDeviceConnection Questions & Answers:
See Code Examples for Android UsbDeviceConnection Methods: