Bug 47663 - Android.Hardware.Usb.UsbContants does not have all of the constants defined in Java UsbConstants
Summary: Android.Hardware.Usb.UsbContants does not have all of the constants defined i...
Alias: None
Product: Android
Classification: Xamarin
Component: Bindings ()
Version: 7.0 (C8)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Atsushi Eno
Depends on:
Reported: 2016-11-22 19:38 UTC by Chris Miller
Modified: 2017-01-05 08:42 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Chris Miller 2016-11-22 19:38:43 UTC
The UsbConstants object defined in https://developer.android.com/reference/android/hardware/usb/UsbConstants.html is missing some constants in the Xamarin Android.Hardware.Usb.UsbContants class.  It should include the following:

        public const int UsbClassAppSpec = 254;
        public const int UsbClassAudio = 1;
        public const int UsbClassCdcData = 10;
        public const int UsbClassComm = 2;
        public const int UsbClassContentSec = 13;
        public const int UsbClassCscid = 11;
        public const int UsbClassHid = 3;
        public const int UsbClassHub = 9
        public const int UsbClassMassStorage = 8;
        public const int UsbClassMisc = 239;
        public const int UsbClassPerInterface = 0;
        public const int UsbClassPhysica = 5;
        public const int UsbClassPrinter = 7;
        public const int UsbClassStillImage = 6;
        public const int UsbClassVendorSpec = 255;
        public const int UsbClassVideo = 14;
        public const int UsbClassWirelessController = 234;
        public const int UsbDirOut = 0;
        public const int UsbDirIn = 128;
        public const int UsbEndpointDirMask = 128;
        public const int UsbEndpointNumberMask = 15;
        public const int UsbEndpointXferBulk = 2;
        public const int UsbEndpointXferControl = 0;
        public const int UsbEndpointXferInt = 3;
        public const int UsbEndpointXferIsoc = 1;
Comment 1 Atsushi Eno 2017-01-05 08:42:13 UTC
They are either in UsbClass or UsbAddressing enum types.

Note that those constant fields that are converted to enums disappear from the class, unless they are needed to remain for old API compatibility.