Commit Graph

187 Commits

Author SHA1 Message Date
Foti Dim 9e5603dc29 Enhance error logging in Bluetooth peripheral updates
- Added logic to differentiate between read and notify/indicate errors in the `didUpdateValueFor` method of `UniversalBlePlugin`.
- Improved error handling by preventing duplicate logging for read operations while maintaining appropriate logging for notify/indicate errors.
2026-01-18 22:05:01 +01:00
Foti Dim 2a65823e6c Update Bluetooth scanning UI and functionality
- Bump version to 1.2.0 in pubspec.lock.
- Enhance ScannerScreen with a Bluetooth availability tooltip and improved search filter UI.
- Refactor AppDrawer to include a queue type selection feature.
- Update ScannedDevicesPlaceholderWidget to include a 'Start Scan' button for better user interaction.
- Improve overall layout and styling for better user experience.
2026-01-18 17:11:22 +01:00
Foti Dim 60a4e2277f Add web app to app showcase 2026-01-16 07:37:35 +01:00
Foti Dim 8557a46d05 Add auto-connect support (#206)
* Add autoConnect support

* Enhance autoConnect functionality for Bluetooth devices

- Added support for managing a set of auto-connect devices in both Android and iOS implementations.
- Updated connection and disconnection logic to handle auto-reconnect scenarios appropriately.
- Improved cleanup processes to prevent unwanted reconnections when devices are manually disconnected.

* Refactor connection button and add auto-reconnect toggle

- Updated the connection button layout for better UI consistency.
- Introduced an auto-reconnect toggle to manage automatic reconnections when devices become available.
- Enhanced connection and disconnection logic to respect the auto-connect setting.

* Update version to 1.2.0 and add CHANGELOG for new features

- Bumped version to 1.2.0.
- Added CHANGELOG.md detailing new features including support for `autoConnect` and UI updates for automatic reconnection.

* Improve readme

* Refactor variable naming for clarity in Bluetooth connection logic

- Changed variable name from `isAutoConnect` to `shouldAutoConnect` for better readability and understanding of its purpose in the connection state handling.

* Refactor connection handling in UniversalBlePlugin

- Simplified connection logic by always cleaning up internal state before sending connection change callbacks.
- Ensured GATT resources are only closed when autoConnect is disabled, allowing for better management of Bluetooth connections.

* Refactor disconnection handling in UniversalBlePlugin

- Introduced a new method `handlePeripheralDisconnection` to encapsulate disconnection logic, improving code readability and maintainability.
- Updated the `centralManager` methods to utilize the new disconnection handler, ensuring consistent behavior across connection state changes.

* Update darwin/Classes/UniversalBlePlugin.swift

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Foti Dim <fotios.dimanidis@a2zebra.de>
Co-authored-by: Navideck Labs <130186950+navidecklabs@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-16 11:36:24 +05:30
Foti Dim a30e84a70c Add informational text and contact option in AppDrawer 2026-01-13 19:01:01 +01:00
Foti Dim 9d73a9f402 Add scan filter persistence using SharedPreferences
- Implemented loading and saving of scan filters (services, name prefix, manufacturer data, and search term) using SharedPreferences.
- Added functionality to apply filters from the loaded preferences.
- Updated the UI to save filters when they change or when the search is cleared.
2026-01-13 11:04:00 +01:00
Foti Dim 395bb548c9 Fix clear log button 2026-01-12 17:48:58 +01:00
EricKwok 1adfa9b485 Implement readRSSI on Android and Darwin (#203) 2026-01-05 17:49:55 +01:00
Foti Dim a5b6af6168 Enforce cxx_std_20 (#205)
* Enforce cxx_std_20

* Bump version

* Switch to private
2026-01-05 16:12:31 +01:00
Foti Dim 7a6e555275 Change button wording 2025-12-29 11:23:50 +01:00
Foti Dim 4b62d61f58 Update readme 2025-12-23 07:48:31 +01:00
Foti Dim 192ee469c3 Add tablet preview device 2025-12-21 10:58:54 +01:00
Foti Dim 9a52bd41a8 Update iOS podfile.lock 2025-12-21 10:43:56 +01:00
Foti Dim af598d13bb Update copyright date 2025-12-21 09:50:49 +01:00
Foti Dim dad326ccff Add device preview 2025-12-21 09:46:17 +01:00
Foti Dim f6eb5dd4e3 Add app readme 2025-12-21 08:56:54 +01:00
Rohit Sangwan 895dcbe343 Improve example app UI (#193)
* Improve example app ui

* Store favorite services in local storage

* Use Text instead of SelectableText

* Improve colors

* Fix flutter analyzer issues

* Revert example app minimum sdk requirement

* Implement hasPermission api and improve ui flow

* More ui improvements

* Improve ScannedItem ui

* Improve control ui

* Change color theme to blue

* Minor improvements wip

* improve responsive ui and flow

* More improvements

* More improvements

* Update Mac podfile

* Fix home page scroll view

* Update app and package name

* Revert changelog

* Resolve Ai comments

---------

Co-authored-by: Foti Dim <foti@navideck.com>
2025-12-21 08:51:36 +01:00
Foti Dim a7e280be29 Add icon 2025-12-17 23:23:52 +01:00
Navideck Labs d26e752e73 Update README and BLE API documentation for MTU handling (#202)
- Clarified MTU request behavior and platform limitations in README.md.
- Added best practices for MTU management in cross-platform BLE applications.
- Enhanced documentation for `requestMtu` method in UniversalBle and BleDeviceExtension to reflect best-effort nature of MTU requests and platform-specific behaviors.

Co-authored-by: Foti Dim <foti@navideck.com>
2025-12-15 07:08:01 +01:00
Foti Dim 01b4511704 Update readme 2025-12-14 12:22:45 +01:00
Rohit Sangwan 97936046e0 Implement hasPermissions API (#201)
* Implement hasPermissions api

* Bump minimum MacOS version to 10.15

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-12 22:10:21 +01:00
Rohit Sangwan 89abb3bf03 Implement Logging (#199)
* Implement Logging

* Add timestamp in OnValueChanged

* improve web and linux logging

* Implement windows and format pigeon

* Fix windows build and unity log level

* Log commands with timestamp

* Fix code doc

* Remove unnecessary import

* Update docs

* Fix crash on windows 11 because of failed pairing

* Update changelog

* Fix native code formatting
2025-12-12 18:56:43 +05:30
Rohit Sangwan d85cbbe725 Fix subscribeNotifications on Android 2025-12-12 16:22:29 +05:30
Rohit Sangwan fa319416ef Implement timestamp in scanResult (#198)
* Implement timestamp in scanResult

* Update pigeon

* implement windows

* Update changelog

* Fix Swift formatting

* Remove android unused import

* Format pigeon generated file
2025-12-11 19:24:13 +05:30
Rohit Sangwan 3116962e8c Implement characteristic descriptor discovery (#196)
* Implement characteristic descriptor discovery

* Improve Darwin services discovery

* Minor mac fix

* Implement Windows support

* discover descriptors in DiscoverServicesAsync api on windows

* Add withDescriptors in discoverServices api

* Implement withDescriptors for Apple and Android

* Fix ai comment and format pigeon generated file

* Resolve Ai comment

* Capitalize API

* Handle empty services scenario

---------

Co-authored-by: Foti Dim <foti@navideck.com>
2025-12-10 11:36:04 +05:30
Rohit Sangwan 09bb22750a Improve disconnect api (#192)
* Improve disconnect api

* Get disconnection event on Web from callback

* Wait for disconnection result on calling disconnect

* Improve linux disconnection

* Update Changelog

* Fix Ai comments
2025-11-14 20:20:22 +05:30
Rohit Sangwan 970db165dd Implement requestPermission API (#190)
* Implement requestPermission api

* Update example ios podfile

* Update example windows dependencies

* Update Readme and Changelog

* Resolve Ai Comments

* Improve bluetooth permission handling

* Update Readme

* Improve readme

---------

Co-authored-by: Foti Dim <foti@navideck.com>
2025-11-13 17:22:17 +01:00
Rohit Sangwan 6e82ceed77 Add button to hide discovered devices in example app (#191)
* Add button to hide discovered devices in example app

* Resolve Ai Comments

* Apply suggestion from @fotiDim

* Add tooltip

---------

Co-authored-by: Foti Dim <foti@navideck.com>
2025-11-13 16:24:11 +01:00
Rohit Sangwan 2adcc06ca6 Add reset instructions (#189) 2025-11-12 14:58:38 +01:00
Rohit Sangwan 34b39597fd Implement isScanning api (#188)
* Implement isScanning api

* Improve IOS scanning api

* Update Readme and Changelog
2025-11-12 14:57:44 +01:00
Rohit Sangwan c3b97e414f Fix iOS example app asking permission on app launch (#187)
* Fix iOS example app asking permission on app launch

* Dispose controllers
2025-11-11 19:44:25 +01:00
Rohit Sangwan acfa3200ca Implement unified and type safe error messages (#186)
* Implement unified and type safe error messages

* Fix Apple error handling

* improve linux exception handling

* improve web exception handling

* fix window imports

* update pigeon generated files

* Fix compilaton issue

* Fix windows error parsing

* Fix windows compilation

* Improve error handling on dart side

* rename _wrapFuture to _executeWithErrorHandling

* Add pigeon generation script and format generated dart file

* Update changelog

* Update readme

---------

Co-authored-by: Foti Dim <foti@navideck.com>
2025-11-11 19:34:29 +01:00
Foti Dim b52ca9ee84 Add pana job 2025-11-10 21:40:31 +01:00
Kevin Evans 5689e551f7 fix: confusing param name (#182)
* fix: confusing param name

* Update lib/src/universal_ble.dart

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update lib/src/universal_ble.dart

Co-authored-by: Navideck Labs <130186950+navidecklabs@users.noreply.github.com>

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Navideck Labs <130186950+navidecklabs@users.noreply.github.com>
2025-10-03 21:58:50 +02:00
Rohit Sangwan af873b3153 Implement exclusion filter (#175)
* Implement exclusion filter

* Fix web filters

* Apply Ai Suggestions

* Fix scanFilterTest

* Resolve Ai comments

* Update readme and changelog

* Update CHANGELOG.md

Co-authored-by: Foti Dim <foti@navideck.com>

* Update exclusion filter doc

* Fix wording

---------

Co-authored-by: Foti Dim <foti@navideck.com>
Co-authored-by: Foti Dim <fotios.dimanidis@a2zebra.de>
2025-09-01 10:31:56 +03:00
Foti Dim f3d5de250c Update changelog 2025-08-20 09:08:19 +02:00
Foti Dim 49a9d1defb Bump example app dependencies 2025-08-20 09:06:44 +02:00
Jon Salmon 3bc259524d fix: resolve BLE device names correctly on Windows (#174)
* fix: resolve BLE device names correctly on Windows

* Clear map on dispose
2025-08-20 09:05:30 +02:00
Rohit Sangwan 71e19988a9 Add clear queue api (#171)
* Add clear queue api

* Minor improvement

* Update changelog

---------

Co-authored-by: Foti Dim <foti@navideck.com>
2025-07-16 12:36:39 +02:00
Rohit Sangwan 0f4bae71e1 Add timeout argument to all APIs (#172)
* Add timeout argument to all apis

* Update Version and changelog

* Bump version

* Update readme

---------

Co-authored-by: Foti Dim <foti@navideck.com>
2025-07-16 11:47:48 +02:00
Rohit Sangwan 2170588045 Fix characteristic value listener and add tests (#168)
* Improve characteristic value listener

* Implement characteristic tests

* Bump version and update changelog
2025-07-08 08:13:45 +02:00
Rohit Sangwan d56851cbfb Wait for writeWithoutResponse completion (#166)
* Wait for writeWithoutResponse request completion on Android

* Wait for writeWithoutResponse request completion on Darwin

* Add WriteWithoutResponse button in example app

* Update changelog and bump version

* Apply suggestions from code review

Co-authored-by: Foti Dim <foti@navideck.com>

---------

Co-authored-by: Foti Dim <foti@navideck.com>
2025-06-26 08:05:59 +02:00
Rohit Sangwan 0008231bdf Update android example gradle 2025-06-24 20:05:49 +05:30
Foti Dim 17e13a475d Fix Android compilation 2025-06-24 15:11:17 +02:00
Rohit Sangwan 0758f5e91d Add high level API (#160)
* Add high-level api extensions for BleDevice and Characteristic

* Add doc comments and move few files to utils

* Add advance documentation

* Make the high level APIs the new default in the readme

* More readme cleanups

* Add pair api, improve notifications apis and deprecate writeValue

* Use highLevel apis in Example

* Rename HighLevel isPaired api to hasPairing api

* Update Readme

* Rename low level readValue api to read and update Readme

* Update UniversalBle to use new apis instead of deprecated internally

* Split queueCommand and queueCommandWithoutTimeout

* Split setNotifiable into subscribeNotifications, subscribeIndications and unsubscribe

* Fix web imports

* Update changelog

* Switch back to isPaired

Co-authored-by: Rohit Sangwan <rohitsangwan647@gmail.com>

* Fix BleDevice toString method

* Switch back to isPaired

* Change peripheral to device

* Rename cached to preferCached

* Remove preferCached from discoverServices()

* Update changelog

* Use cached services

* Add ///

* Reverse withoutResponse to withResponse to avoid negation

* Link to low level API

* Move connectionState to public readme

* Rename disableSubscriptions to unsubscribe

* Improve documentation

* Fix getService cache

* Add NotFoundException

---------

Co-authored-by: Foti Dim <foti@navideck.com>
2025-06-19 13:02:14 +02:00
Rohit Sangwan 72090571a3 Add WebBluetoothGloballyDisabled exception and fix availability state (#165)
* Add WebBluetoothGloballyDisabled exception and fix availability state

* Update changelog and version

---------

Co-authored-by: Foti Dim <foti@navideck.com>
2025-06-13 00:30:13 +02:00
Foti Dim 4be924cd98 Bump actions/cache to v4 2025-05-30 11:26:02 +02:00
Foti Dim e9f97d1085 Improve readme clarity 2025-05-30 11:21:06 +02:00
Foti Dim d87a129bf8 Bump checkout action to v4 2025-05-30 11:18:12 +02:00
Foti Dim fa98d2989b Switch to flutter_lints: ^6.0.0 2025-05-29 21:35:04 +02:00