Android Guides | Samples

Android.Hardware.Usb.UsbDeviceConnection.ClaimInterface Method

Claims exclusive access to a UsbInterface.

Syntax

[Android.Runtime.Register("claimInterface", "(Landroid/hardware/usb/UsbInterface;Z)Z", "GetClaimInterface_Landroid_hardware_usb_UsbInterface_ZHandler")]
public virtual Boolean ClaimInterface (UsbInterface intf, Boolean force)

Parameters

intf
the interface to claim
force
true to disconnect kernel driver if necessary

Remarks

Claims exclusive access to a UsbInterface. This must be done before sending or receiving data on any UsbEndpoints belonging to the interface.

[Android Documentation]

Requirements

Namespace: Android.Hardware.Usb
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 12