Skip to content

v1.1.0

Choose a tag to compare

@phattran1201 phattran1201 released this 27 Feb 10:10
· 3 commits to main since this release

πŸš€ v1.1.0 β€” Android Refactor: Unified Printer Adapter Architecture

Released: 2026-02-27

πŸ”§ Refactoring (Android)

This release is a major internal refactor of the Android layer, consolidating duplicated logic across BLE, Network, and USB printers into a clean, unified adapter hierarchy.

New Classes

  • BasePrinterAdapter β€” Base class for all printer adapters, centralizing shared logic for image processing and base64 decoding.
  • RNBasePrinterModule β€” Common React Native bridge logic extracted and shared across all printer modules.

Refactored

  • BLEPrinterAdapter, NetPrinterAdapter, USBPrinterAdapter β€” Now extend the unified base classes, eliminating code duplication.
  • RNBLEPrinterModule, RNNetPrinterModule, RNUSBPrinterModule β€” Slimmed down and delegating shared logic to RNBasePrinterModule.

Build & Configuration

  • Updated build.gradle with explicit AndroidX support and Gradle plugin 8.13.2.
  • Added gradle.properties for AndroidX migration flags.
  • Updated Gradle wrapper.
  • Corrected package naming to com.harold.rn.printer across all Android files.

πŸ—‘οΈ Removed

  • BaseStreamPrinterAdapter.java β€” Merged into the new BasePrinterAdapter hierarchy.
  • ExampleInstrumentedTest.java / ExampleUnitTest.java β€” Removed stale boilerplate test files.

⚠️ Notes

  • No public API changes β€” this is a refactor with no functional breaking changes for JS/TS consumers.
  • Improves reliability with better automatic reconnect logic in the base adapter.

Full Changelog: v1.0.20...v1.1.0