posprinter_usb_android 1.0.0
posprinter_usb_android: ^1.0.0 copied to clipboard
Android USB host transport for ESC/POS thermal receipt printers: device discovery, the USB permission handshake and raw bulk-transfer printing.
1.0.0 #
First release of posprinter_usb_android, an Android-only USB fork of
flutter_pos_printer_platform_image_3
1.2.4 (MIT, © 2022 Gustavo Morales and contributors).
Keeps the maintained Android USB fixes from the fork it is based on:
- A USB permission handshake that completes only once Android answers the
dialog, instead of resolving
connectPrinterbefore the grant. - Android 13+
IntentFilterreceivers registered withContext.RECEIVER_NOT_EXPORTED, and a cancelled stalePendingIntentfrom a previous process so the permission dialog cannot reappear over the launcher. USBStatus.attachedevents so the Dart side can reconnect immediately on replug, andUSBStatus.noneon detach.- Chunked bulk writes that respect the endpoint's
maxPacketSize, stop on the first failed chunk and close a stale endpoint so the next attempt re-opens it.
Reduced to the Android USB transport:
- Removed the iOS and Windows implementations (and the vendored
libGSDK.a). - Removed the Bluetooth, BLE and network (TCP) transports and the Star/TSPL/ ESC-POS generator surface. The package now depends on nothing but Flutter.
- Removed the Bluetooth, Bluetooth-admin and location permissions from the plugin manifest, so they are no longer merged into the host app.
PrinterTypenow only hasusb, andPrinterManageronly exposes the USB transport.- Converted the Android build script to
build.gradle.ktsand migrated it to AGP built-in Kotlin. The module no longer applies the Kotlin Gradle Plugin itself, which clears Flutter's "plugins that apply KGP" warning. - Minimum supported version is now Flutter 3.44 / Dart 3.12, required by
kotlin.compilerOptions.