Sdílet prostřednictvím


UsbDeviceConnection.SetInterface(UsbInterface) Method

Definition

Sets the current android.hardware.usb.UsbInterface.

[Android.Runtime.Register("setInterface", "(Landroid/hardware/usb/UsbInterface;)Z", "GetSetInterface_Landroid_hardware_usb_UsbInterface_Handler")]
public virtual bool SetInterface (Android.Hardware.Usb.UsbInterface? intf);
[<Android.Runtime.Register("setInterface", "(Landroid/hardware/usb/UsbInterface;)Z", "GetSetInterface_Landroid_hardware_usb_UsbInterface_Handler")>]
abstract member SetInterface : Android.Hardware.Usb.UsbInterface -> bool
override this.SetInterface : Android.Hardware.Usb.UsbInterface -> bool

Parameters

Returns

true if the interface was successfully selected

Attributes

Remarks

Sets the current android.hardware.usb.UsbInterface. Used to select between two interfaces with the same ID but different alternate setting.

Java documentation for android.hardware.usb.UsbDeviceConnection.setInterface(android.hardware.usb.UsbInterface).

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.

Applies to