public class UsbAccessorySetupUsbManager extends UsbCloverManager<java.lang.Void>
See https://source.android.com/accessories/aoa.html#determine-accessory-mode-support
UsbCloverManager.InputResult, UsbCloverManager.UsbConnectException, UsbCloverManager.UsbDeviceNotFoundException
Modifier and Type | Field and Description |
---|---|
static android.util.Pair<java.lang.Integer,java.lang.Integer>[] |
VENDOR_PRODUCT_IDS |
CONNECTION_RETRY_WAIT_MS, CONNECTION_TIMEOUT_MS, mConnection, READ_TIMEOUT_MS, SETUP_RETRY_WAIT_MS, SETUP_TIMEOUT_MS, VERBOSE, WRITE_TIMEOUT_MS
Constructor and Description |
---|
UsbAccessorySetupUsbManager(android.content.Context context) |
Modifier and Type | Method and Description |
---|---|
protected int |
getMaxWriteDataSize() |
protected int |
getReadSize() |
protected android.util.Pair<java.lang.Integer,java.lang.Integer>[] |
getVendorProductIds() |
protected boolean |
isBulkInterface() |
static boolean |
isUsbDeviceAttached(android.content.Context context) |
protected boolean |
sendAccessoryString(int index,
java.lang.String value) |
void |
startAccessoryMode() |
disconnect, findDevice, getReadTimeOut, isConnected, isInterfaceMatch, isMatch, onPostDisconnect, onPreConnect, onTransferError, open, postStatusChange, processInputData, processOutputData, read, unwrapReadPacket, wrapWritePacket, write
public static final android.util.Pair<java.lang.Integer,java.lang.Integer>[] VENDOR_PRODUCT_IDS
public UsbAccessorySetupUsbManager(android.content.Context context)
protected int getReadSize()
getReadSize
in class UsbCloverManager<java.lang.Void>
protected int getMaxWriteDataSize()
getMaxWriteDataSize
in class UsbCloverManager<java.lang.Void>
public static boolean isUsbDeviceAttached(android.content.Context context)
protected android.util.Pair<java.lang.Integer,java.lang.Integer>[] getVendorProductIds()
getVendorProductIds
in class UsbCloverManager<java.lang.Void>
public void startAccessoryMode() throws UsbCloverManager.UsbConnectException
protected boolean isBulkInterface()
isBulkInterface
in class UsbCloverManager<java.lang.Void>
protected boolean sendAccessoryString(int index, java.lang.String value)