Android Guides | Samples

Android.Hardware.Usb.UsbManager.HasPermission Method

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

Syntax

[Android.Runtime.Register("hasPermission", "(Landroid/hardware/usb/UsbAccessory;)Z", "GetHasPermission_Landroid_hardware_usb_UsbAccessory_Handler")]
public virtual Boolean HasPermission (UsbAccessory accessory)

Parameters

accessory
to check permissions for

Remarks

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

[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