Langue

UsbDeviceConnection.ClaimInterface(UsbInterface, Boolean) Méthode

Définition

Revendications d’accès exclusif à un 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

Paramètres

intf
UsbInterface

l’interface à revendiquer

force
Boolean

true pour déconnecter le pilote du noyau si nécessaire

Retours

true si l’interface a été correctement revendiquée

Attributs

Remarques

Revendications d’accès exclusif à un android.hardware.usb.UsbInterface. Cette opération doit être effectuée avant d’envoyer ou de recevoir des données sur n’importe quel android.hardware.usb.UsbEndpointélément appartenant à l’interface.

Java documentation pour android.hardware.usb.UsbDeviceConnection.claimInterface(android.hardware.usb.UsbInterface, boolean).

Les parties de cette page sont des modifications basées sur le travail créé et partagé par Android Open Source et utilisées en fonction des termes décrits dans la Creative Commons 2.5 Attribution License.

S’applique à