Skip to main content

Nethereum.Maui.AndroidUsb

NuGet: Nethereum.Maui.AndroidUsb | Source: src/Nethereum.Maui.AndroidUsb/

Nethereum.Maui.AndroidUsb

Android USB device support for .NET MAUI applications. Enables communication with USB-connected hardware wallets (Ledger, Trezor) on Android devices through the Android USB Host API.

Key Components​

ClassPurpose
MauiAndroidUsbDeviceFactoryCreates USB device connections using the Android USB Host API
MauiAndroidUsbDeviceWrapper around Android UsbDeviceConnection for HID communication
UsbPermissionHelperHandles Android USB permission requests
UsbAttachReceiverBroadcast receiver for USB device attach/detach events

Usage​

Register the USB device factory in your MAUI application:

// In MauiProgram.cs
builder.Services.AddSingleton<IHidDeviceFactory, MauiAndroidUsbDeviceFactory>();

The factory is then used by Nethereum.Signer.Ledger or Nethereum.Signer.Trezor to communicate with the hardware wallet over USB.

Relationship to Other Packages​