Skip to content

v3.7.7: Critical Bug Fixes and Android 12+ Compatibility

Choose a tag to compare

@sfourdrinier sfourdrinier released this 14 Dec 22:43
· 126 commits to master since this release
d8d05e9

πŸš€ Release v3.7.7

Critical Bug Fixes (4 Stop-Ship Issues)

Fixed 4 critical bugs in the new ConnectionManager:

  1. βœ… Promise Coalescing Hang - Multiple concurrent connect() calls to the same device now properly share the same promise
  2. βœ… Memory Leak on Destroy - Auto-reconnect disconnect subscriptions are now properly cleaned up
  3. βœ… Connection Storms - Repeated disconnect events no longer trigger multiple reconnection attempts
  4. βœ… Race Condition Fix - cancel() now properly stops reconnection attempts using attemptId generation pattern

Android 12+ Compatibility (Production-Critical)

Fixed 3 critical Android 12+ foreground service issues:

  1. βœ… STOP Service Crash - Now uses stopService() instead of startService()
  2. βœ… Foreground State Check - Prevents ForegroundServiceStartNotAllowedException on Android 12+
  3. βœ… Safe UPDATE Notification - Gracefully handles Android 12+ restrictions

Improvements

  • βœ… Robust Auto-Reconnect - Now triggers on ANY disconnect (handles platform quirks where error=null)
  • βœ… State Preservation - connect() now preserves autoReconnect settings and callbacks
  • βœ… Connection Timeout Support - Prevents connection hangs
  • βœ… Comprehensive Test Suite - 9 tests covering all critical bugs
  • βœ… Complete Documentation - Migration guide, Android 12+ warnings, platform parity table

Breaking Changes

None - Fully backward compatible.

Deprecated

  • ConnectionQueue and ReconnectionManager are now deprecated (use ConnectionManager instead)
  • These classes remain available for backward compatibility

Installation

npm install @sfourdrinier/react-native-ble-plx@3.7.7
# or
pnpm add @sfourdrinier/react-native-ble-plx@3.7.7

Documentation

See the README for:

  • Android 12+ setup requirements
  • Migration guide from deprecated classes
  • Platform parity details
  • Complete API documentation

For a public fork supporting diverse BLE platforms and use cases.