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

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

Android UsbManager examples from Open Source projects
This code example shows how to use the following methods: openAccessory
141:	mFileDescriptor = mUsbManager.openAccessory(accessory); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getDeviceList, openDevice
22:	UsbDevice device = manager.getDeviceList().get(path); 
-
24:	return manager.openDevice(device); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAccessoryList, hasPermission
68:	UsbAccessory[] accessoryList = manager.getAccessoryList(); 
-
74:	result = ((accessoryList != null) && (manager.hasPermission(accessoryList[0]))); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: openAccessory
141:	mFileDescriptor = mUsbManager.openAccessory(accessory); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: openDevice
135:	UsbDeviceConnection connection = mUsbManager.openDevice(device); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAccessoryList, hasPermission, openAccessory
40:	UsbAccessory[] accessories = manager.getAccessoryList(); 
-
44:	if (manager.hasPermission(accessory)) { 
45:	mParcelFileDescriptor = manager.openAccessory(accessory); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAccessoryList, hasPermission, openAccessory, requestPermission
117:	UsbAccessory[] accessoryList = mManager.getAccessoryList(); 
-
126:	mManager.requestPermission(accessoryList[0], mPermissionIntent); 
-
128:	if(mManager.hasPermission(mAccessory)) 
-
182:	mFileDescriptor = mManager.openAccessory(accessory); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAccessoryList, openAccessory
78:	UsbAccessory[] accessories = usbManager.getAccessoryList(); 
-
85:	mFileDescriptor = usbManager.openAccessory(mAccessory); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAccessoryList, hasPermission
57:	UsbAccessory[] accessoryList = mUsbManager.getAccessoryList(); 
-
60:	if (mUsbManager.hasPermission(accessory)) { 
61:	Accessory.setupInstance(mCallback, mUsbManager, accessory); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAccessoryList
59:	UsbAccessory[] accessories = mUsbManager.getAccessoryList(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAccessoryList
65:	UsbAccessory[] accessories = mUsbManager.getAccessoryList(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: hasPermission, requestPermission
262:	if (!mManager.hasPermission(device)) { 
-
264:	mManager.requestPermission(device, mPermissionIntent); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: openAccessory
442:	filedescriptor = usbmanager.openAccessory(accessory); 
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods: openAccessory
160:	ParcelFileDescriptor d = usbManager.openAccessory(accessory); 
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods: openAccessory
279:	mFileDescriptor = mUsbManager.openAccessory(accessory); 
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods: hasPermission, openDevice, requestPermission
119:	if (device != null && !manager.hasPermission(device)) { 
-
121:	manager.requestPermission(device, permissionIntent); 
-
125:	if (device == null || !manager.hasPermission(device)) { 
-
129:	final UsbDeviceConnection connection = manager.openDevice(device); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: openAccessory
198:	filedescriptor = usbmanager.openAccessory(accessory); 
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods: openAccessory
81:	mFileDescriptor = mUsbManager.openAccessory(accessory); 
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods: openAccessory
108:	mFileDescriptor = mUsbManager.openAccessory(mAccessory); 
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods: openAccessory
208:	filedescriptor = usbmanager.openAccessory(accessory); 
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods: requestPermission
67:	manager.requestPermission(device, mPermissionIntent); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: openAccessory
167:	mFileDescriptor = mUsbManager.openAccessory(accessory); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: getDeviceList, openDevice
22:	UsbDevice device = manager.getDeviceList().get(path); 
-
24:	return manager.openDevice(device); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: openAccessory
251:	mFileDescriptor = mUsbManager.openAccessory(accessory); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: openDevice
192:	UsbDeviceConnection connection = mUsbManager.openDevice(device); 
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods: getAccessoryList, getDeviceList
20:	UsbAccessory[] accessoryList = um.getAccessoryList(); 
-
24:	HashMap<String, UsbDevice> hashMap = um.getDeviceList(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: openAccessory
99:	mFileDescriptor = mUsbManager.openAccessory(accessory); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: openDevice
114:	connection = manager.openDevice(device); 
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods: openAccessory
251:	mFileDescriptor = mUsbManager.openAccessory(accessory); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: openAccessory
131:	mFileDescriptor = mUsbManager.openAccessory(accessory); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: openDevice
182:	UsbDeviceConnection connection = mUsbManager.openDevice(device); 
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods: openAccessory
73:	fileDescriptor = usbManager.openAccessory(accessory); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: openDevice
85:	connection = manager.openDevice(device); 
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods: openDevice
83:	connection = manager.openDevice(device); 
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods: openDevice
81:	connection = manager.openDevice(device); 
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods: openDevice
111:	UsbDeviceConnection connection = mUsbManager.openDevice(device); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: requestPermission
70:	mUsbManager.requestPermission(mDevice, mPermissionIntent); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: openDevice
82:	connection = manager.openDevice(device); 
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods: openDevice
82:	connection = manager.openDevice(device); 
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods: getDeviceList
43:	addAll(manager.getDeviceList().values()); 
Full Snippet Info
4
CodeRank
Related Android UsbManager Questions & Answers:
See Code Examples for Android UsbManager Methods: