Code example for UsbDevice

Methods: getProductIdgetVendorId

                if (!ACTION_USB_PERMISSION.equals(intent.getAction())) {
                    listener.onException(new IOException("No permission to access USB device."));
                listener.onBind(device.getVendorId(), device.getProductId(), new AndroidDriverBinding(manager, device));
        }, new IntentFilter(ACTION_USB_PERMISSION));
        manager.requestPermission(device, PendingIntent.getBroadcast(context, 0, new Intent(ACTION_USB_PERMISSION), 0));
    private final UsbManager manager;
    private final UsbDevice device;
    private transient UsbDeviceConnection conn;
    public AndroidDriverBinding(UsbManager manager, UsbDevice device) {
        this.manager = manager;
        this.device = device;
Connect your IDE to all the code out there  Get Codota for Java