/** * expo-usb-serial — Expo Config Plugin * * This plugin automatically: * 1. Adds the required USB_HOST Android feature declaration. * 2. Adds the USB_PERMISSION broadcast receiver for the runtime permission dialog. * 3. Copies res/xml/usb_device_filter.xml into the host app's Android resources, * declaring the supported USB Vendor/Product IDs so Android launches the app * when a matching USB device is plugged in. */ import { type ConfigPlugin } from "@expo/config-plugins"; export type UsbSerialPluginOptions = { /** * List of USB device filters to declare in the device_filter XML. * Each entry specifies a Vendor ID (and optionally a Product ID) that should * trigger the app when the USB device is plugged in. * * If omitted, a broad filter covering all common USB-to-serial chips is used. * * Vendor IDs must be given in decimal (not hex). */ devices?: Array<{ /** USB Vendor ID in decimal (e.g. 1027 for FTDI = 0x0403). */ vendorId: number; /** Optional USB Product ID in decimal. Omit to match any product from this vendor. */ productId?: number; /** Optional human-readable label (ignored by Android, used for documentation). */ label?: string; }>; /** * Whether to register the USB intent filter so the app launches automatically * when a known device is plugged in. * @default true */ autoLaunchOnConnect?: boolean; }; declare const withUsbSerial: ConfigPlugin; export default withUsbSerial;