UsbDeviceConnection.ClaimInterface(UsbInterface, Boolean) 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.
Claims exclusive access to a android.hardware.usb.UsbInterface
.
[Android.Runtime.Register("claimInterface", "(Landroid/hardware/usb/UsbInterface;Z)Z", "GetClaimInterface_Landroid_hardware_usb_UsbInterface_ZHandler")]
public virtual bool ClaimInterface (Android.Hardware.Usb.UsbInterface? intf, bool force);
[<Android.Runtime.Register("claimInterface", "(Landroid/hardware/usb/UsbInterface;Z)Z", "GetClaimInterface_Landroid_hardware_usb_UsbInterface_ZHandler")>]
abstract member ClaimInterface : Android.Hardware.Usb.UsbInterface * bool -> bool
override this.ClaimInterface : Android.Hardware.Usb.UsbInterface * bool -> bool
Parameters
- intf
- UsbInterface
the interface to claim
- force
- Boolean
true to disconnect kernel driver if necessary
Returns
true if the interface was successfully claimed
- Attributes
Remarks
Claims exclusive access to a android.hardware.usb.UsbInterface
. This must be done before sending or receiving data on any android.hardware.usb.UsbEndpoint
s belonging to the interface.
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.