public class UsbPlatform

  1. Object
  2. UsbPlatform

Platform-supplied implementation of the USB host APIs. Application code talks to Usb; the facade fetches this via Display.getInstance().getUsbPlatform().

Part of the framework’s service-provider interface, not intended for application use.

Constructors

public UsbPlatform()

Methods

public boolean isSupported()
public UsbDevice[] listDevices()
public void addDeviceListener(UsbDeviceListener listener)
public void removeDeviceListener(UsbDeviceListener listener)
public void requestPermission(UsbDevice device)
public boolean hasPermission(UsbDevice device)
public InputStream openInputStream(UsbDevice device, int endpointAddress) throws IOException
public OutputStream openOutputStream(UsbDevice device, int endpointAddress) throws IOException

Inherited methods

Constructor details

UsbPlatform

public UsbPlatform()

Method details

isSupported

public boolean isSupported()

listDevices

public UsbDevice[] listDevices()

addDeviceListener

public void addDeviceListener(UsbDeviceListener listener)

removeDeviceListener

public void removeDeviceListener(UsbDeviceListener listener)

requestPermission

public void requestPermission(UsbDevice device)

hasPermission

public boolean hasPermission(UsbDevice device)

openInputStream

public InputStream openInputStream(UsbDevice device, int endpointAddress) throws IOException

openOutputStream

public OutputStream openOutputStream(UsbDevice device, int endpointAddress) throws IOException