Skip to content

chore: Bump universal_ble from 3.3.0 to 3.4.0 - #761

Merged
marcnause merged 1 commit into
mainfrom
dependabot/pub/universal_ble-3.4.0
Nov 24, 2026
Merged

marcnause merged 1 commit into
mainfrom
dependabot/pub/universal_ble-3.4.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 23, 2026

Copy link
Copy Markdown
Contributor

Bumps universal_ble from 3.3.0 to 3.4.0.

Changelog

Sourced from universal_ble's changelog.

3.4.0

  • Subscription state is now tracked per characteristic instance instead of per characteristic UUID, so a device that exposes the same UUID in several services no longer reports every instance as subscribed when one is, and unsubscribing one instance no longer clears the state that describes the others. UniversalBle.isSubscribed and UniversalBle.getSubscribedCharacteristics take an optional serviceId to ask about one service; without it they keep the previous answer, which is true when any service exposes the characteristic, and BleCharacteristic.isSubscribed now uses the characteristic's own service. getSubscribedCharacteristics still returns deduplicated UUIDs, now sorted rather than in subscription order (#393).
  • Characteristic values now carry the UUID of the service that owns the characteristic, so two characteristics with the same UUID in different services are told apart. The Pigeon onValueChanged callback passes the service, BleCharacteristicValue gains serviceId, characteristicValueStream takes an optional serviceId filter, and BleCharacteristic.onValueReceived uses the characteristic's own service automatically. Android, Apple, Windows, Linux and Web report the owning service. A value whose service a platform does not report — a custom platform implementation, or an unusable service id — still reaches a service-filtered stream, so existing callers and platforms keep their behaviour (#391).
  • BREAKING CHANGE: an out-of-tree UniversalBlePlatform that overrides characteristicValueStream or updateCharacteristicValue must add the new optional serviceId parameter to its override — the base signatures gained it, and an override cannot omit a named parameter. Callers of the public API are unaffected: the parameter is optional, BleCharacteristicValue.serviceId is additive, and onValueChange keeps its shape (#391).
  • Android: a write or descriptor write that the stack refuses by throwing now fails that call with a classified error and withdraws its pending result, so the next completion is no longer delivered to an orphaned future and every later write stops lagging by one and timing out. The realistic trigger is Android 15+, where BluetoothGatt.writeCharacteristic(characteristic, value, writeType) throws IllegalArgumentException for an attribute value longer than 512 bytes; a value that long is now rejected before it reaches the stack with invalidAttributeLength (#387).
  • Android: report an unknown (null) connectability state instead of crashing on the first scan result on Android 7.x and older. ScanResult.isConnectable() is API 26+, so reading it unguarded on the plugin's minSdkVersion 21 threw NoSuchMethodError for every result on API 21-25 (#383).
  • Android peripheral: removeService and clearServices now drop the cached state that described the services they took off the server — characteristic lookups, instance ids, descriptor and per-client CCCD values, and subscriptions — so a service registered again in the same session notifies through its new characteristics instead of orphaned ones, and findService no longer resolves the old registration. Only the removed service's own state is dropped: when another registered service exposes the same characteristic UUID, the UUID keeps resolving to it and its CCCD values and subscriptions are kept, and the caches are cleared even when the server call throws. Characteristic instance ids may also contain any character now that the per-client CCCD cache is no longer keyed by a delimited string (#385).
  • Android peripheral: the plugin now listens for BluetoothAdapter.ACTION_STATE_CHANGED and drops the GATT server, the advertiser and the state that belongs to that adapter session when Bluetooth turns off, so the next addService/startAdvertising re-opens them instead of failing with "Service registration rejected". The drop reports what it took away, so an app can resynchronise: every connected central is emitted as disconnected and advertising moves from STARTING/ADVERTISING/STOPPING to IDLE with a "Bluetooth turned off" message. A rejected registration is only retried on a freshly opened server when the current one was opened in an earlier adapter session; a server that merely refuses a service it already holds — a hot restart or a duplicated addService — is left alone instead of losing every other service, every client and advertising. If the retry itself fails, the original rejection is still the error that is reported (#384).
  • Android peripheral: dispose() is idempotent and tolerates a receiver that cannot be unregistered, detaching the engine no longer aborts its teardown when the adapter is unavailable, and a failed adapter-name restore is retried on the next STATE_ON instead of being forgotten.
  • Windows: read BluetoothLEAdvertisementReceivedEventArgs.IsConnectable through a queried IBluetoothLEAdvertisementReceivedEventArgs2 instead of the C++/WinRT require projection. When the interface is missing, the unguarded call dereferenced null instead of throwing, so it killed the process with an access violation that the catch (...) and Dart code could never see. A failed query now reports an unknown (null) connectability state, so connectableOnly keeps passing the device, and the fallback is logged once per process (#373).
  • Disconnect bypasses blocked GATT command queues and cancels unsent commands for the target device, preserving queued work for other devices. Two consequences are visible to callers: disconnect's queueId argument is now ignored (and deprecated with an annotation, scheduled for removal in 4.0.0), so a disconnect no longer waits behind that queue, and the cancelled commands fail with a UniversalBleException carrying UniversalBleErrorCode.operationCancelled and the canonical device id in details, instead of a bare Exception('Queue Cancelled'). The command that is already running is not interrupted: it completes normally, and only commands still waiting are cancelled. That typed error now also covers commands cancelled by clearQueue(). Because cancellation completes the command's future with an error, a command started without awaiting it now reports an unhandled async error on every disconnect that cancels it — await it or attach a catchError handler.
  • Android: bind pending reads, writes, descriptor operations, RSSI, service discovery and notification subscriptions to their submitting GATT, so a callback or cleanup from a replaced client cannot consume a newer request for the same address. A discovery from a superseded client no longer updates the service cache, and a CCCD callback whose descriptor was rebuilt by a discovery still completes its subscription. Connection state, connection parameters and notifications reported by a client that a newer connect() replaced are ignored, as are notifications from the client disconnect() is closing until its STATE_DISCONNECTED arrives, so a link that is being torn down no longer reports values, or a stale disconnected event, as the current connection's (#381).
  • Apple: bind pending writes to the submitting peripheral object. A write or peripheralIsReady callback, and the cleanup after a disconnection, are matched to a request by object identity, so they cannot consume a replacement peripheral’s request. A pending write is now failed with deviceDisconnected when its owner is not the object the plugin routes the device’s callbacks to, or when that owner is not connected; that happens when the device disconnects, when connect runs, and when the app writes to it again, and covers a superseded object whose state still reads .connected. A write submitted through a replaced peripheral therefore fails right away with the message “Peripheral replaced” instead of waiting for the Dart timeout. The unsupported-write rejection keeps the per-case withResponse/withoutResponse message Android emits (#378).
  • iOS: when several FlutterEngines run in one process, only one engine creates its CBCentralManager with the central state restoration identifier — the first engine that registers when Bluetooth permission is already granted, or on a fresh install the first engine to use Bluetooth after the grant — rather than whichever engine uses Bluetooth first. Later engines get a manager without one instead of one CoreBluetooth reports as unsupported, and only the owning engine creates its manager at launch. Ownership ends when the owning engine is deallocated, but an engine that has already created its manager never regains restoration, so only an engine that registers later can pick the identifier up. A denied claim is logged at info level when the losing engine creates its manager without restoration; logging defaults to none, so info logging must be enabled to see it (#386).
Commits
  • d77635a Track subscription state per characteristic instance (#393)
  • a18a76c Distinguish same-UUID characteristics in different services (#392)
  • ef6ab42 Android: fail a refused write without stranding its pending result (#390)
  • a72589e Clarify that disconnect's queueId is scheduled for removal in 4.0.0
  • ae2e281 Bump to 3.4.0
  • 1108dbb iOS: give the central state restoration identifier one owner per process (#386)
  • 9d8c302 Apple: bind pending writes to the peripheral the plugin routes to (#378)
  • b54f5f5 Android: bind GATT operations to their client and drop superseded callbacks (...
  • b23b932 Disconnect bypasses blocked GATT command queues (#377)
  • a50b163 Android peripheral: forget service state on removal and reopen after Bluetoot...
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot Bot added dart Pull requests that update dart code dependencies Pull requests that update a dependency file labels Nov 23, 2026
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

Ask an organization administrator to verify that this bot has an active assigned CodeRabbit review seat. See the seat-assignment guide. After the seat is confirmed, request a review again.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6fcce7e2-4596-47e3-a6fc-c65a53aad8c6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Build Status: Build workflow failed. Please check the Actions logs for details.

Build artifacts to test

(Available before failure)

Note: Screenshots are not generated on failed builds. Below are the latest screenshots from the pr-screenshots branch, if they exist.

Screenshots

Android Screenshots

@bhavjsh
bhavjsh requested review from bhavjsh and marcnause November 23, 2026 19:28
Bumps [universal_ble](https://github.com/Navideck/universal_ble) from 3.3.0 to 3.4.0.
- [Changelog](https://github.com/Navideck/universal_ble/blob/main/CHANGELOG.md)
- [Commits](Navideck/universal_ble@3.3.0...3.4.0)

---
updated-dependencies:
- dependency-name: universal_ble
  dependency-version: 3.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@marcnause
marcnause force-pushed the dependabot/pub/universal_ble-3.4.0 branch from fbad531 to 9fdc1a9 Compare November 24, 2026 12:30
@marcnause
marcnause merged commit f683225 into main Nov 24, 2026
15 of 17 checks passed
@marcnause
marcnause deleted the dependabot/pub/universal_ble-3.4.0 branch November 24, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dart Pull requests that update dart code dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants