Android Guides | Samples

Android.Hardware.Usb.UsbManager.HasPermission Method

Returns true if the caller has permission to access the device.

Syntax

[Android.Runtime.Register("hasPermission", "(Landroid/hardware/usb/UsbDevice;)Z", "GetHasPermission_Landroid_hardware_usb_UsbDevice_Handler")]
public virtual Boolean HasPermission (UsbDevice device)

Parameters

device
to check permissions for

Remarks

Returns true if the caller has permission to access the device. Permission might have been granted temporarily via UsbManager.RequestPermission(UsbDevice,PendingIntent) or by the user choosing the caller as the default application for the device.

[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