onDeviceStatusChanged

Observe compact status changes for accepted Bluetooth devices.

  • Stable unknown
  • Release candidate since 1.16.1-rc.3
  • Development since 1.16.1-dev.2111+9796905

The provider calls onDeviceStatusChanged when the manager reports a device status. The payload contains the device metadata, the new status, and an optional measurement type key.

<BTProvider
  {...providerProps}
  onDeviceStatusChanged={({ deviceData, status, measurementTypeKey }) => {
    updateDeviceRow(deviceData.id, status, measurementTypeKey);
  }}
/>

status is one of Connected, Disconnected, Measuring, or LowBattery. Use this callback for a concise connection indicator. Pairing state, battery percentage, and history-transfer progress use onConnectionEvent.

When the BTProvider is also inside DeviceListProvider, the SDK updates matching built-in device list entries by deviceData.name. The app may use this callback to drive its own UI and state store.

See BTDeviceList for the SDK list component and connection events.

Last updated on