UsbManager.OpenAccessoryInputStream(UsbAccessory) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Opens an input stream for reading from the USB accessory.
[Android.Runtime.Register("openAccessoryInputStream", "(Landroid/hardware/usb/UsbAccessory;)Ljava/io/InputStream;", "GetOpenAccessoryInputStream_Landroid_hardware_usb_UsbAccessory_Handler", ApiSince=36)]
public virtual System.IO.Stream OpenAccessoryInputStream(Android.Hardware.Usb.UsbAccessory accessory);
[<Android.Runtime.Register("openAccessoryInputStream", "(Landroid/hardware/usb/UsbAccessory;)Ljava/io/InputStream;", "GetOpenAccessoryInputStream_Landroid_hardware_usb_UsbAccessory_Handler", ApiSince=36)>]
abstract member OpenAccessoryInputStream : Android.Hardware.Usb.UsbAccessory -> System.IO.Stream
override this.OpenAccessoryInputStream : Android.Hardware.Usb.UsbAccessory -> System.IO.Stream
Parameters
- accessory
- UsbAccessory
the USB accessory to open an input stream for
Returns
input stream to read from given USB accessory
- Attributes
Remarks
Opens an input stream for reading from the USB accessory. If accessory is not open at this point, accessory will first be opened.
If data is read from the created java.io.InputStream
all data of a USB transfer should be read at once. If only a partial request is read, the rest of the transfer is dropped.
The caller is responsible for ensuring that the returned stream is closed.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.